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 ?

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
.



Relevant Pages

  • Re: WSAENOBUFS on winsock client application
    ... I analyzed winsock sources, and the error WSAENOBUFS is returned ... I've developed a C++ stream socket client/server application. ... connection there is a separate thread (there is a maximum of 40 ...
    (microsoft.public.win32.programmer.networks)
  • Main office and Remote office options...
    ... Main office with SBS Std w/25u licenses behind Netgear router/firewall ... I know they should use a new SBS box at the remote offcie but they ... I suspect a VPN connection between the offices with a VPN ... Is the current broadband speed sufficient for the client/server SQL? ...
    (microsoft.public.windows.server.sbs)
  • Re: RPC over HTTP - have you gotten it to work?
    ... is like between the client/server. ... The reason that I ask is that Outlook will consider the broadband connection ... Therefore if the box for fast is unchecked, Outlook ...
    (microsoft.public.outlook)
  • Re: Advice on mod_lisp-based web application.
    ... My server needs to be able to maintain connection ... As for the termination issue, I've been tinkering around with a ... of the options when you start a modlisp server is a timeout. ... Approach the whole client/server interaction ...
    (comp.lang.lisp)
  • Re: SqlConnection: 1 long or many short...
    ... While ASP.NET and Web Services architectures ... depend on the connection pool and connect, query, close connection ... Windows Forms (client/server) applications do not. ... This permits intimate management of the server state, ...
    (microsoft.public.dotnet.framework.adonet)