<div dir="ltr">If you use the enet connect mechanism, you are only going to get a connection with the first remote host that responds.<div><br></div><div style>The only way to get an actual broadcast functionality is to use raw UDP sockets. Create a raw UDP socket, broadcast UDP packet over this, have remote hosts respond in kind with UDP packets, and collect these addresses so that you may open normal ENet connections to them.</div>
<div style><br></div><div style>There are tricks you can do to reuse the actual ENet socket for this, but I would get the basic idea implemented first before worrying about trying to do that...</div></div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Thu, Apr 11, 2013 at 6:57 AM, <a href="mailto:zxz3121@gmail.com">zxz3121@gmail.com</a> <span dir="ltr"><<a href="mailto:zxz3121@gmail.com" target="_blank">zxz3121@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><u></u>
<div style="MARGIN:10px">
<div> </div>
<div>I have used ENet couple days , there are some questions. I have started two
server by binding the port 59671 , then I created a client
<div class="im"><div>like this</div>
<div>ENetAddress caddress;</div>
<div>caddress.host=ENET_HOST_BROADCAST;</div>
<div>caddress.port = 59672;</div>
<div>when I use enet_host_connect it just connected one server,I do not know
why. </div>
<div>please help me,I want to know how many servers have been started with port
59671 by broadcast message in LAN.</div>
<div></div>
<div>it will be very grateful,if you can reply and give me an small
Tutorial.</div></div></div>
<hr style="WIDTH:210px;min-height:1px" align="left" color="#b5c4df" size="1"><span class="HOEnZb"><font color="#888888">
<div><span><a href="mailto:zxz3121@gmail.com" target="_blank">zxz3121@gmail.com</a></span></div></font></span></div>
<br>_______________________________________________<br>
ENet-discuss mailing list<br>
<a href="mailto:ENet-discuss@cubik.org">ENet-discuss@cubik.org</a><br>
<a href="http://lists.cubik.org/mailman/listinfo/enet-discuss" target="_blank">http://lists.cubik.org/mailman/listinfo/enet-discuss</a><br>
<br></blockquote></div><br></div>