Cancel asynchrous Socket Read

  • Thread starter Thread starter Tod Johnson
  • Start date Start date
T

Tod Johnson

Hi,

Is possible somehow to cancel BeginRead operation from the socket, when
I try to exit from the program the thread:

System.Net.OSSOCK.recv is hanging and the program after the exit still
exists and locked.


Thank you,
Tod
 
Hi Tod,

I have the same problem. Did you find a solution? If yes please let me know.

Thank you in advance.

Joerg
 
Just call EndRead on the socket. It will throw an exception, but it
should clear the socket so you can close it.

- Russ Ryba
 
Back
Top