In my server - side TCP /IP application , I create a listening blocking
socket.
The WSAAccept is called from a different thread. The socket works ok
(accepts connections and blocks again etc). The problem is that when I try
to close the socket,
shutdown blocks and the socket doesnt close.
(in the same application if I use winsocket 1 - accept -, instead of
winsocket 2 the socket closes OK).
The source is something like this:
if(m_hSocket!=INVALID_SOCKET)
{
shutdown(m_hSocket,SD_RECEIVE);
closesocket(m_hSocket);
}
The other thread is blocked in WSAAccept()
Any ideas ?
Thanx in advance
PS:
For a simple TCP/IP application would I profit by using winsocket 2 instead
of 1 (I mean in performance)