in reply to Clean closing sockets
I used to solve this problem in C using setsockopt(2), with the option SO_REUSEADDR. It basically tells the system that it's OK to bind to a port as long as no one is listening to the same port.
In Perl you can say:
-- TMTOWTDIsetsockopt(YOURSOCKET, SOL_SOCKET, SO_REUSEADDR, 1) or die "your messa +ge\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Clean closing sockets
by JPaul (Hermit) on Aug 16, 2001 at 00:19 UTC | |
by trantor (Chaplain) on Aug 16, 2001 at 00:36 UTC | |
by JPaul (Hermit) on Aug 16, 2001 at 00:50 UTC |