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