Microsoft KB Archive/125486

= TCP/IP Ioctlsocket Function Returns Incorrect Data =

Article ID: 125486

Article Last Modified on 10/13/2003

-

APPLIES TO


 * Microsoft TCP/IP for Windows for Workgroups 3.11a
 * Microsoft Windows for Workgroups 3.11

-



This article was previously published under Q125486





SYMPTOMS
A 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



STATUS
Microsoft 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.

Additional query words: wfw wfwg 3.11 3.11a prodtcp32

Keywords: KB125486

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.