ANONYMOUS wrote:
> I'm attempting to do this exact thing where as the station starts up it sends its name to all its neighbours (before any requests are made), then in the main server loop with select() each station picks up on neighboring station's names. But for me I'm having issues where not all the names come back, and instead only some of them do. Some others are just not received and I'm unsure as to why that would be happening even though the select() function is present and should be able to handle the availability of sockets for when they are readable.
One possibility - if you're starting all of your station servers from a script then, when one of them transmits that first 'hello' datagram, its destination server might not have started yet. The datagram is transmitted, but there's no server at the destination host and port there to receive it.
Try - before transmitting your first datagram,
sleep(2)
to give all servers a chance to start.
??