Stephen Shirley wrote:
> Mornin' all,
> Right, here's a weird one for ye. I have a processs on a linux box,
> writing to 2 sun boxes alternately, over UDP. If i shut down the
> listener on sun box no. 1, i start getting "Connection refused" from sun
> box no. _2_. Just to be sure, i used netcat to connect to the port on
> box no. 2, and sure enough, it was fine.
> Now all the above writing was done using sendto() on a single
> socket. If i change the code so that it opens a new socket each time it
> wants to write, and calls connect(), and then uses write(), it all works
> fine.
Weird. Are you sure you're not calling connect() in the sendto()
implementation?
> I'm also having problems with dropped packets on a private lan, but
> i don't know if that's related yet or not.Anyone have any
> suggestions/similar experiences/funny stoires?
You can't ever assume no packet loss for UDP.
Even on localhost.
Padraig.
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!