"Christopher McDonald" <ch*i*.*c*o*a*
d@u*a*e*u*a*> wrote:
> ANONYMOUS wrote:
>
> > Can we pass on the names of the neighbours in command line along with the IP:port or is this not allowed
>
> Not permitted, because it's not what is specified on the project sheet,
> and will prevent your project from being tested using some common scripts.
>
> It's trivial to first send a datagram to each of your neighbours, telling them your name.
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.
The number of names which come back is also different every time the stations are run, which is making me think that maybe the issue lies with the blocking nature of receiving datagrams (despite select())
Would you know why this is occuring?