TCP/IP Ioctlsocket Function Returns Incorrect DataLast reviewed: September 9, 1996Article ID: Q125486 |
The information in this article applies to:
SYMPTOMSA call to ioctlsocket() with a command of FIONREAD should return the amount of data currently in the receive buffer on a specific socket. If a recv() is then posted to the same socket, the recv() should complete successfully and return with the specified number of bytes of data. If a second ioctlsocket() call is issued to the same socket after a recv() completes, the number of bytes returned should be the bytes in the receive buffer before the recv() minus the bytes read by the recv() (assuming no additional data came in over the network). The problem described here is that number of bytes in the receive buffer returned from the ioctlsocket() call is not updated after a recv() is issued. The following sample debug log illustrates this problem:
Got an FD_READ Disabling FD_READ FIONREAD bytes = 239. Bytes read = 100. ioctl for FIONREAD returned 239. Bytes read = 100. ioctl for FIONREAD returned 239. Bytes read = 39. ioctl for FIONREAD returned 0. Enabling FD_READ WM_DESTROY Closing DebugFile STATUSMicrosoft has confirmed this to be a problem in Microsoft TCP/IP-32 for Windows for Workgroups, version 3.11a. This problem was corrected in Microsoft TCP/IP-32 for Windows for Workgroups, version 3.11b.
|
KBCategory: kbnetwork kbbug3.11a
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |