B
Bruce Vander Werf
I am using the asynchronous send/receive methods of the Socket class.
When the remote end closes the socket, the callback for receive is
called and EndReceive returns 0.
Socket.Connected still returns true at this point, which I know is
expected behavior, so when I reach this state, I begin sending on this
socket every few seconds until an error is generated.
After the exception is raised, Socket.Connected returns false.
However, I cannot connect again to this socket. Calls to BeginConnect
fail with a message "A connect request was made on an already
connected socket."
How do I work around this, short of recreating the socket?
--Bruce
When the remote end closes the socket, the callback for receive is
called and EndReceive returns 0.
Socket.Connected still returns true at this point, which I know is
expected behavior, so when I reach this state, I begin sending on this
socket every few seconds until an error is generated.
After the exception is raised, Socket.Connected returns false.
However, I cannot connect again to this socket. Calls to BeginConnect
fail with a message "A connect request was made on an already
connected socket."
How do I work around this, short of recreating the socket?
--Bruce