BUG: Send() Fails with Error WSAENOBUFS Over Blocking Socket

ID: Q201213


The information in this article applies to:
  • Microsoft Windows NT 4.0
  • Microsoft Windows versions 95, 98


SYMPTOMS

When large blocks of data (for example, 3-4 MB) are sent over a blocking socket, send eventually fails with error 10055, WSAENOBUFS.

The online documentation indicates that send over a blocking socket should block if there is no system buffer space available:

If no buffer space is available within the transport system to hold the data to be transmitted, send will block unless the socket has been placed in a nonblocking mode. On nonblocking stream oriented sockets, the number of bytes written can be between 1 and the requested length, depending on buffer availability on both client and server machines.


RESOLUTION

When you encounter the problem described in the "Symptoms" section, please consider using one of the following workarounds:

  • Use the socket in nonblocking or asynchronous mode.


  • Break large-size data blocks into small ones and specify a relatively small buffer in send for blocking sockets, preferably no larger than 64K.


  • Set the SO_SNDBUF socket option to 0 (zero) to allow the stack to send from your application buffer directly.



STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article.

Additional query words:

Keywords : kbNTOS400bug kbSDKPlatform kbWinOS95bug kbWinOS98bug kbWinsock kbDSupport kbGrpNet
Version : WINDOWS:95,98; winnt:4.0
Platform : WINDOWS winnt
Issue type : kbbug


Last Reviewed: November 30, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.