Re: WSAENOBUFS on winsock client application
- From: "Volodymyr M. Shcherbyna" <v_scherbina@xxxxxxxxxxxxxxx>
- Date: Fri, 9 May 2008 10:58:33 +0200
I analyzed winsock sources (XP SP2), and the error WSAENOBUFS is returned
usually when allocation of memory failes (RtlHeapAllocate(...)) or
equivalents:
What is your OS?
--
V.
This posting is provided "AS IS" with no warranties, and confers no
rights.
"FriedhelmEichin" <FriedhelmEichin@xxxxxxxxxxxxxxxx> wrote in message
news:FB4F7278-628C-4AF1-A22A-278509CE667B@xxxxxxxxxxxxxxxx
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 ?
The other parts of the application (client winsock threads) continue
working without problems.
The thread that causes the error is not able to connect to
the server any more (while other established connections are working
fine)
The connection-attempt is being retried every minute but for that
thread the behaviour is always the same after the first occurance of
this error. It just repeats forever.
What kind of (winsock-) leak may be left after shutting down the
socket as documented by MS, waiting for any I/O operation to terminate
and calling closesocket ?
I've done a lot of stress testing, but the problem only occurs at the
customer side, so I cannot reproduce it here.
It seems to me that the network is not very steady there..., even
though the application should not hang.
Any help appreciated !
--
best regards
friedhelm
.
- Follow-Ups:
- Re: WSAENOBUFS on winsock client application
- From: FriedhelmEichin
- Re: WSAENOBUFS on winsock client application
- References:
- WSAENOBUFS on winsock client application
- From: FriedhelmEichin
- WSAENOBUFS on winsock client application
- Prev by Date: WSAENOBUFS on winsock client application
- Next by Date: Re: WSAENOBUFS on winsock client application
- Previous by thread: WSAENOBUFS on winsock client application
- Next by thread: Re: WSAENOBUFS on winsock client application
- Index(es):
Relevant Pages
|
|