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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top