PRB: recv() w/MSG_PEEK Always Returns Wrong Buffer SizeID: Q140263
|
An Application that uses the Winsock 1.1 call recv(..., MSG_PEEK) repeatedly, will always receive the amount of data as in the first call. This amount only changes when you call recv without MSG_PEEK.
This is the result of a performance optimization within AFD.SYS.
recv() with MSG_PEEK should generally be avoided. It is a very inefficient way to retrieve data and definitely not recommended if you care about performance. A much better solution would be to simply receive the data into user buffers and use it directly from there.
This behavior is by design.
Keywords : kbnetwork kbtshoot kbAPI kbNTOS351 kbNTOS400 kbSDKPlatform kbWinsock kbGrpNet
Version :
Platform :
Issue type : kbprb
Last Reviewed: March 6, 1999