JPaul has asked for the wisdom of the Perl Monks concerning the following question:
I'm writing a sockets server and am having problems doing what apparently should be a relatively easy thing.
Whenever I terminate the server (I trap SIGINT), I do a
close($server);
However, if I immediately attempt to restart my server the port is still bound and I have to wait for Linux to clear the port before I can redo the bind. Should I be doing something more flamboyant to $server than simply close()ing it?
Cheers all,
JP
-- Alexander Widdlemouse undid his bellybutton and his bum dropped off --
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Clean closing sockets
by traveler (Parson) on Aug 15, 2001 at 23:52 UTC | |
|
Re: Clean closing sockets
by trantor (Chaplain) on Aug 15, 2001 at 23:58 UTC | |
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 |