I'm sure this has been asked a million times, but I did a search and didn't
see anything.
I have a socket in my form and I call MySocket.BeginReceiveFrom to listen
for incoming data asyncronously. How do I cancel it so I can close the
application. I call MySocket.Shutdown(SocketShutdoen.Both) then
MySocket.Close in the Form.Dispose method. I get an error when the app
closes in the OnReceive async callback when it tries to call
MySocket.ReceiveFrom.
There has to be a way to cancel the read or at least wait for the
EndReceiveFrom. The OnReceive callback should get triggered by the socket
shutdown right?
Thanks,
jim