[ENet-discuss] [***SPAM***] Send client list to all clients

Lee Salzman lsalzman1 at cox.net
Wed May 28 03:32:44 PDT 2008


ENet is simply a networking protocol, sends a packet from point A to
point B, where A and B are directly connected peers. It has no concept
of a server or client. If you have a client-server setup and you want to
exchange messages among clients, you are responsible for implementing
the routing on the server yourself. For example, your client sends a
message to the server with an identifier (which you have to assign
yourself to clients) describing the other client he wants to send it to,
the server finds the client matching this identifier, and routes the
message to the new client.

Lee

Ng Yao Kheng wrote:
> Hi all,
>
> Thanks for your mail. For enet, to send from client to client where
> all client connect to the server, is there a function provide by enet
> to do this?? Any idea how this can be implemented?
>
> Thanks a lot
>
> > Date: Tue, 27 May 2008 08:51:08 -0700
> > From: lsalzman1 at cox.net
> > To: enet-discuss at cubik.org
> > Subject: Re: [ENet-discuss] [***SPAM***] Send client list to all clients
> >
> > An enet packet is simply a piece of malloc'd memory. You can stuff in
> > whatever data you want into it. The peer -> data field is not networked
> > in any way, it is simply for your own internal usage.
> >
> > Lee
> >
> > Ng Yao Kheng wrote:
> > >
> > > Hi Williams,
> > >
> > > As I am quite new to network programming, can you give me a hint of
> > > how to achieve this? The ip address and the port number are integer
> > > and data in enet which is packet is string if I am not wrong......how
> > > can I send a series of ip address and port number to the client and
> > > then later interpret by the client correctly.....
> > >
> > >
> > > I had an! other problem:
> > > >From client, I want to send to server a packet by following
> > >
> > > At client side,
> > >
> > > peer->data = "SERVER2";
> > > int temp = enet_peer_send (peer, 0, packet);
> > > if(temp == 0)
> > > printf("Send Successful %s\n", peer->data);
> > >
> > >
> > > At server side,
> > >
> > > case ENET_EVENT_TYPE_RECEIVE:
> > >
> > > printf ("A packet of length %u containing %s was received from %s on
> > > channel %u.\n",
> > > event.packet -> dataLength,
> > > event.packet -> data,
> > > event.peer -> data,
> > > event.channelID);
> > >
> > > the data in event.peer->data is null,....I receive the data but why I
> > > did not receive the string "SERVER" in event.peer->data????
> > >
> > > Please advise, thanks a lot
> > >
> > > Regards,
> > ! >
> > >
> > >
> > > --------------------------
> ----------------------------------------------
> > > From: stevewilliams at kromestudios.com
> > > To: enet-discuss at cubik.org
> > > Date: Tue, 27 May 2008 14:08:17 +1000
> > > Subject: Re: [ENet-discuss] [***SPAM***] Send client list to all
> > > clients
> > >
> > > There is no in-built method in enet to do that. In your code you
> > > would create a packet that contains the list of clients, and when
> > > a client connects to the host, the host would build the packet
> > > from its own list of clients and send that packet to the new client.
> > >
> > > Steve 'Sly' Williams
> > >
> > > Lead Programmer
> > >
> > > Krome Studios
> > >
> > > *From:* enet-discuss-bounces at cubik.org
> > > [mailto:enet-discuss-bounces at cubik.org] *On Behalf Of *Ng Yao Kheng
> > > *Sent:* Tuesday, 27 May 2008 1:57 PM
> > > *To:* enet-discuss at cubik.org
> >! > *Subject:* [***SPAM***] [ENet-discuss] Send client list to all
> clients
> > >
> > > Hi all,
> > >
> > > I am not sure if the mailing list is still active as my previous
> > > two mail were never answered.
> > >
> > > I have a question now and hope to receive an answer as my project
> > > is very urgent.
> > >
> > > Using enet, a client connect to server. When another client
> > > connect to the server, the server will have a list of 2 clients
> > > connected. Can I know of any idea how to replicate the client list
> > > to the client so that client can display a list of connected clients?
> > >
> > > Really appreaciate any reply. Thanks.....
> > >
> > > Best Regards,
> > >
> > >
> ------------------------------------------------------------------------
> > >
> > > Always-on security tools provide safer ways to connect and shar! e
> > > anywhere. Find out more. Windows Live
> > > < http://get.live.com/familysafety/overview>
> > >
> > >
> > >
> ------------------------------------------------------------------------
> > >
> > >
> > >
> > > This message and its attachments may contain legally privileged or
> > > confidential information. This message is intended for the use of
> > > the individual or entity to which it is addressed. If you are not
> > > the addressee indicated in this message, or the employee or agent
> > > responsible for delivering the message to the intended recipient,
> > > you may not copy or deliver this message or its attachments to
> > > anyone. Rather, you should permanently delete this message and its
> > > attachments and kindly notify the sender by reply e-mail. Any
> > > content of this message and its attachments, which does not relate
> > > to the official business of the sending company must be taken not
> >! ; > to have been sent or endorsed by the sending company or any of its
> > > related entities. No warranty is made that the e-mail or
> > > attachment(s) are free from computer virus or other defect.
> > >
> > >
> > >
> ------------------------------------------------------------------------
> > > Make the most of what you can do on your PC and the Web, just the w!
> > > ay you want. Windows Live <http://www.get.live.com/wl/all>
> > >
> ------------------------------------------------------------------------
> > >
> > > _______________________________________________
> > > ENet-discuss mailing list
> > > ENet-discuss at cubik.org
> > > http://lists.cubik.org/mailman/listinfo/enet-discuss
> > >
> >
> > _______________________________________________
> > ENet-discuss mailing list
> > ENet-discuss at cubik.org
> > http://lists.cubik.org/mailman/listinfo/enet-d! iscuss
>
>
> ------------------------------------------------------------------------
> Chat online and in real-time with friends an d family! Windows Live
> Messenger <http://get.live.com/messenger/overview>
> ------------------------------------------------------------------------
>
> _______________________________________________
> ENet-discuss mailing list
> ENet-discuss at cubik.org
> http://lists.cubik.org/mailman/listinfo/enet-discuss
>   



More information about the ENet-discuss mailing list