No subject


Mon Feb 11 23:15:10 PST 2008


&nbsp;<BR>
At client side,<BR>
&nbsp;<BR><FONT size=2>
peer-&gt;data = </FONT><FONT color=#a31515 size=2>"SERVER2"</FONT><FONT size=2>;<BR>
</FONT><FONT color=#0000ff size=2>int</FONT><FONT size=2> temp = enet_peer_send (peer, 0, packet);<BR>
</FONT><FONT color=#0000ff size=2>if</FONT><FONT size=2>(temp == 0)</FONT><BR>
<FONT size=2>&nbsp;&nbsp; printf(</FONT><FONT color=#a31515 size=2>"Send Successful %s\n"</FONT><FONT size=2>, peer-&gt;data);</FONT><BR>
<FONT size=2></FONT>&nbsp;<BR>
<FONT size=2></FONT>&nbsp;<BR>
<FONT size=2>At server side, </FONT><BR>
<FONT size=2></FONT>&nbsp;<BR><FONT size=2><FONT color=#0000ff size=2>
case</FONT><FONT size=2><FONT color=#000000> ENET_EVENT_TYPE_RECEIVE:</FONT><BR>
</FONT>&nbsp;<BR>
<FONT size=2>printf (</FONT><FONT color=#a31515 size=2>"A packet of length %u containing %s was received from %s on channel %u.\n"</FONT><FONT size=2>,<BR>
</FONT><FONT color=#0000ff size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; event</FONT><FONT size=2>.packet -&gt; dataLength,<BR>
</FONT><FONT color=#0000ff size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; event</FONT><FONT size=2>.packet -&gt; data, <BR>
</FONT><FONT color=#0000ff size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; event</FONT><FONT size=2>.peer -&gt; data,<BR>
</FONT><FONT color=#0000ff size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; event</FONT><FONT size=2>.channelID);</FONT><BR>
&nbsp;<BR>
the data in event.peer-&gt;data is null,....I receive the data but why I did not receive the string "SERVER" in event.peer-&gt;data????<BR>
<FONT size=2></FONT>&nbsp;<BR>
<FONT size=2>Please advise, thanks a lot</FONT><BR>
<FONT size=2></FONT>&nbsp;<BR>
<FONT size=2>Regards,</FONT><BR>
<FONT size=2>&nbsp;<BR></FONT>
</FONT><BR>&nbsp;<BR>
<BLOCKQUOTE>
<HR>
From: stevewilliams at kromestudios.com<BR>To: enet-discuss at cubik.org<BR>Date: Tue, 27 May 2008 14:08:17 +1000<BR>Subject: Re: [ENet-discuss] [***SPAM***] Send client list to all clients<BR><BR>
<META content="Microsoft SafeHTML" name=Generator>
<STYLE>
.ExternalClass .EC_shape
{;}
</STYLE>

<STYLE>
.ExternalClass p.EC_MsoNormal, .ExternalClass li.EC_MsoNormal, .ExternalClass div.EC_MsoNormal
{margin-bottom:.0001pt;font-size:12.0pt;font-family:SimSun;}
.ExternalClass a:link, .ExternalClass span.EC_MsoHyperlink
{color:blue;text-decoration:underline;}
.ExternalClass a:visited, .ExternalClass span.EC_MsoHyperlinkFollowed
{color:purple;text-decoration:underline;}
.ExternalClass p
{margin-right:0cm;margin-left:0cm;font-size:12.0pt;font-family:SimSun;}
.ExternalClass span.EC_EmailStyle18
{font-family:'Calibri','sans-serif';color:#1F497D;}
.ExternalClass .EC_MsoChpDefault
{font-size:10.0pt;}
@page Section1
{size:612.0pt 792.0pt;}
.ExternalClass div.EC_Section1
{page:Section1;}

</STYLE>

<DIV class=EC_Section1>
<P class=EC_MsoNormal><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'">There is no in-built method in enet to do that.&nbsp; 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.</SPAN></P>
<P class=EC_MsoNormal><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'">&nbsp;</SPAN></P>
<DIV>
<P class=EC_MsoNormal><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'">Steve 'Sly' Williams</SPAN></P>
<P class=EC_MsoNormal><SPAN style="FONT-SIZE: 9pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'">Lead Programmer</SPAN></P>
<P class=EC_MsoNormal><SPAN style="FONT-SIZE: 9pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'">Krome Studios</SPAN></P></DIV>
<P class=EC_MsoNormal><SPAN style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'">&nbsp;</SPAN></P>
<DIV>
<DIV style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0cm; BORDER-TOP: #b5c4df 1pt solid; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: medium none; PADDING-TOP: 3pt; BORDER-BOTTOM: medium none">
<P class=EC_MsoNormal><B><SPAN lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: 'Tahoma','sans-serif'">From:</SPAN></B><SPAN lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: 'Tahoma','sans-serif'"> enet-discuss-bounces at cubik.org [mailto:enet-discuss-bounces at cubik.org] <B>On Behalf Of </B>Ng Yao Kheng<BR><B>Sent:</B> Tuesday, 27 May 2008 1:57 PM<BR><B>To:</B> enet-discuss at cubik.org<BR><B>Subject:</B> [***SPAM***] [ENet-discuss] Send client list to all clients</SPAN></P></DIV></DIV>
<P class=EC_MsoNormal>&nbsp;</P>
<P class=EC_MsoNormal style="MARGIN-BOTTOM: 12pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Tahoma','sans-serif'">Hi all,<BR>&nbsp;<BR>I am not sure if the mailing list is still active as my previous two mail were never answered. <BR>&nbsp;<BR>I have a question now and hope to receive an answer as my project is very urgent. <BR>&nbsp;<BR>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?<BR>&nbsp;<BR>Really appreaciate any reply. Thanks.....<BR>&nbsp;<BR>Best Regards,<BR>&nbsp;</SPAN></P>
<DIV class=EC_MsoNormal style="TEXT-ALIGN: center" align=center><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Tahoma','sans-serif'">
<HR align=center width="100%" SIZE=2>
</SPAN></DIV>
<P class=EC_MsoNormal><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Tahoma','sans-serif'">Always-on security tools provide safer ways to connect and share anywhere. Find out more. <A href="http://get.live.com/familysafety/overview" target=_blank>Windows Live</A></SPAN></P></DIV><BR>
<HR>
<FONT face=Arial color=gray size=1><BR><BR><BR>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.<BR></FONT></BLOCKQUOTE><br /><hr />Make the most of what you can do on your PC and the Web, just the way you want. <a href='http://www.get.live.com/wl/all' target='_new'>Windows Live</a></body>
</html>
--_f783d945-9943-49ad-80b4-951ff13cdc88_--


More information about the ENet-discuss mailing list