WSAENOBUFS on winsock client application



Hello,

I've developed a C++ stream socket client/server application. The
client-side is implemented using winsock 2 overlapped I/O. For each
connection there is a separate thread (there is a maximum of 40
connection being handled). The normal behaviour is quite fine, no
problems. But in some environment where a connection is being broken
from time to time due to a bad dsl connection or something similar I
get the error WSAENOBUFS when calling WSARecv for the first time after
the following connection has been estabilished. I'm sure that the
previous connections are closed well and all pending requests are
terminated, so that there should be no more resources used by the
application.

What may cause this problem ?

Any help appreciated !
regards
.