L
Lee Gillie
What is the proper way to cancel a pending BeginReceive/EndReceive ?
Can it be done without generating an exception ?
Currently I shutdown and close the socket. The blocking "EndReceive"
throws System.ObjectDisposedException.
I try to avoid throwing exceptions when ever possible, and reserve
them for unanticipated problems. Trying to stop a background
read/process loop is an anticipated activity. For me the debugger
delays 15 seconds when ever an exception is thrown. But regardless, I
am hoping for a cleaner approach. I can not find guidance on this
issue in framework documentation.
Forgive the cross posts. It would be nice to have a specific
framework/network related NG.
Thanks for any insight - Best regards - Lee Gillie - Spokane, WA
Can it be done without generating an exception ?
Currently I shutdown and close the socket. The blocking "EndReceive"
throws System.ObjectDisposedException.
I try to avoid throwing exceptions when ever possible, and reserve
them for unanticipated problems. Trying to stop a background
read/process loop is an anticipated activity. For me the debugger
delays 15 seconds when ever an exception is thrown. But regardless, I
am hoping for a cleaner approach. I can not find guidance on this
issue in framework documentation.
Forgive the cross posts. It would be nice to have a specific
framework/network related NG.
Thanks for any insight - Best regards - Lee Gillie - Spokane, WA