[ENet-discuss] Broadcasting to multiple servers

Beau Albiston albiston at cynergy.com
Tue Feb 20 15:57:06 PST 2007


I'm using the Bonjour API, which is a DNS-SD (or DNS Service Discovery) 
implementation.  It works on a number of platforms, including Windows.

http://www.dns-sd.org/
http://developer.apple.com/networking/bonjour/index.html

-Beau

Ben Moreno wrote:
> Hello all,
>
> I'm running into a problem when trying to use ENet to find servers on  
> a local network.  I need to be able to be able to broadcast a packet  
> such that any servers that are listening can either respond in kind  
> or initiate a connection.  As far as I can see, there is no way of  
> being sure that you've connected to more than whichever server  
> happens to reply first.
>
> The servers I'm using are simple ENet servers, essentially from the  
> tutorial.   The client (after initializing everything as usual),  
> creates a peer with the address set to ENET_HOST_BROADCAST, then  
> loops enet_host_service until it receives a connection event.  After  
> that, a second peer is created, which also broadcasts.  This peer  
> will usually end up connecting to the same server.
>
> Switching the order of calls around doesn't seem to help.  For  
> instance, waiting to run enet_host_service() until after both peers  
> have been created gives the same behavior (usually).
>
> Am I missing something, or is connecting via ENET_HOST_BROADCAST  
> limited to which server happens to respond first?  Is there any way  
> of reliably knowing how many servers responded and who they are?
>
> Thanks,
> Ben
> _______________________________________________
> 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