in reply to Re^2: How to answer a UDP broadcast
in thread How to answer a UDP broadcast
Well then part of my post stands, and that is you cannot listen on a Broadcast UDP socket, you need to open another one. My advise is to add to your protocol specification a dedicated "hello" reply port and always listen to broadcast responses on that port instead of the current set up (reply on the source port).
Another alternative which gets my vote is to have a central tracking server that new servers register with and recieve back a list of all currently live servers. This tracker would also periodically have to ping the other servers to make sure that they are still functioning and handle goodbyes, but would prevent the issues that udp packetloss can cause (always use TCP for talking with this tracker, heck the 'ping' could just be a "hi/hello" going down the inital socket).
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: How to answer a UDP broadcast
by mje (Curate) on Jun 19, 2007 at 21:13 UTC | |
by Trizor (Pilgrim) on Jun 19, 2007 at 22:56 UTC |