Hello,
I've got a huge problem with async sockets.
I've created a networked virtual environment, using async socket programming.
The problem I face occurs when I close the listener socket. It listens using socket.BeginAccept(...).
When a client disconnects, the socket is disconnected like this:
try
{
socket.Shutdown(SocketShutDown.Receive);
}
catch
{
...
}
socket.Close();
(The application is still running now!)
Now, when an incoming call comes (which it just should ignore), my application crashes with:
Uncaugt exception in System.dll, InvalidOperationException in system.net.sockets.Socket.AcceptCallback......
How the hell can I catch this? Better, why does it still throw this? it is shutdown!
Thanks,
-- Rob.