How to abort reading operation on blocking socket?
-
How to abort reading operation on blocking socket? WSAAsyncSelect doesn't work.
-
How to abort reading operation on blocking socket? WSAAsyncSelect doesn't work.
-
What do you mean WSAAsyncSelect does not work? WSAAsyncSelect is a non-blocking I/O model. Kuphryn
He means following situation. There are 2 threads. One thread sets the socket to blocking state and starts to receive data. Let the next recv() function blocks the socket. The second thread wants to terminate this operation. What should it do? Calling AssyncSelect() from the second thread doesn't set the socket back to non-blocking mode.
-
He means following situation. There are 2 threads. One thread sets the socket to blocking state and starts to receive data. Let the next recv() function blocks the socket. The second thread wants to terminate this operation. What should it do? Calling AssyncSelect() from the second thread doesn't set the socket back to non-blocking mode.
All is OK now. Sockets set back to non-blocking mode after a few seconds - use select()