stop the blocking recv

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Hi

I run recv in a thread. How can I stop the recv in another thread?

TerminateThread is not a good solution to me

I've tried
shutdown(connfd, 2);
closesocket(connfd);

However, the recv doesn't return.

Any suggestion?

Thanks

JC
.


Quantcast