Re: WSAENOBUFS on winsock client application
- From: FriedhelmEichin <FriedhelmEichin@xxxxxxxxxxxxxxxx>
- Date: Fri, 9 May 2008 04:35:00 -0700
I'd guess that it's more likely to be a bug in the way the code
handle's the unexpected connection termination which possibly results
in some corruption somewhere. Or just broken error handling?
Yes, that might be possible, of course. The way handling an unexpected
connection closure (caused by the server or network) is as follows :
1. receiving error on pending I/O-Operation (WSARecv or WSASend) or
receiving an FD_CLOSE event.
2. call WSASendDisconnect(...)
3. wait for termination of pending I/O operation, if any.
4. activate the DONTLINGER Option using setsockopt
5. call closesocket
any idea what might be wrong ?
--
best regards
friedhelm
"Len Holgate" wrote:
It doesnt really make sense that it's just ONE connection having this.
problem though, does it? Surely if Winsock was experiencing a low
resource situation you'd get WSAENOBUFS occurring on lots of
operations on various open sockets, rather than just on the one?
I've seen this a lot under real low resource situations, see here for
more details:
http://www.lenholgate.com/archives/000580.html
http://www.lenholgate.com/archives/000564.html
and things that these blog posts link to...
I'd guess that it's more likely to be a bug in the way the code
handle's the unexpected connection termination which possibly results
in some corruption somewhere. Or just broken error handling?
As an aside, I thought that WSAENOBUFS was related to non-paged pool
or locked pages limits than simple memory allocation?
Len Holgate
http://www.lenholgate.com
Free C++ IOCP server framework available here: http://www.lenholgate.com/archives/000637.html
- Follow-Ups:
- Re: WSAENOBUFS on winsock client application
- From: Charles Wang[MSFT]
- Re: WSAENOBUFS on winsock client application
- From: Len Holgate
- Re: WSAENOBUFS on winsock client application
- References:
- WSAENOBUFS on winsock client application
- From: FriedhelmEichin
- Re: WSAENOBUFS on winsock client application
- From: Volodymyr M. Shcherbyna
- Re: WSAENOBUFS on winsock client application
- From: FriedhelmEichin
- Re: WSAENOBUFS on winsock client application
- From: Volodymyr M. Shcherbyna
- Re: WSAENOBUFS on winsock client application
- From: Len Holgate
- WSAENOBUFS on winsock client application
- Prev by Date: Re: WSAENOBUFS on winsock client application
- Next by Date: Re: WSAENOBUFS on winsock client application
- Previous by thread: Re: WSAENOBUFS on winsock client application
- Next by thread: Re: WSAENOBUFS on winsock client application
- Index(es):