If you use the enet connect mechanism, you are only going to get a connection with the first remote host that responds.
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. 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... On Thu, Apr 11, 2013 at 6:57 AM, [email protected] <[email protected]>wrote: > ** > > 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 > like this > ENetAddress caddress; > caddress.host=ENET_HOST_BROADCAST; > caddress.port = 59672; > when I use enet_host_connect it just connected one server,I do not know > why. > please help me,I want to know how many servers have been started with port > 59671 by broadcast message in LAN. > it will be very grateful,if you can reply and give me an small Tutorial. > ------------------------------ > [email protected] > > _______________________________________________ > ENet-discuss mailing list > [email protected] > http://lists.cubik.org/mailman/listinfo/enet-discuss > >
_______________________________________________ ENet-discuss mailing list [email protected] http://lists.cubik.org/mailman/listinfo/enet-discuss
