in reply to Re: Disconnect client without closing socket?
in thread Disconnect client without closing socket?

This is not right. Yes, after you exit, the socket will be closed eventually, but there is a delay. Some time it takes couple of muinutes for the local port to be freed up, and before that that local port is no longer available to others. You have to explicitly close your socket, to free the local port up NOW, RIGHT NOW.

Update: Although from pure programming view, Reuse would work, but it is obviously not a good practice, and that's not the purpose of Reuse. You should always close your socket before exit. Don't program in a quick and dirty way, always do it in the right way with the best style.
  • Comment on Re: Re: Disconnect client without closing socket?

Replies are listed 'Best First'.
Re: Re: Re: Disconnect client without closing socket?
by chromatic (Archbishop) on Dec 15, 2002 at 22:13 UTC

    Enable the Reuse option when creating the socket.