George
2007-11-22 22:20:00 UTC
I have searched all over in newsgroups and web but can't figure out what is
the criteria that triggers the recv notification to be posted by IOCP.
For example, if I post a WSARecv with 8K buffer and, lets suppose, my server
is connected with a client over a slow connection therefore it will take the
client a while to send 8K. How does winsock handles these situations? would
it wait for 8K buffer to be filled? would it just receive whatever bytes it
does and post a notification? or does it wait for a particular time-period
and fills buffers till then before posting a notification to IOCP?
I also read about posting zero-byte buffers on WSARecv to avoid memory being
locked into non-paged pools. Same question, when is the notification for
zero-byte buffers sent? let assume, the client sends 8K of data, now would
the notification be sent as soon as any data arrives on the socket even 100
bytes or would it wait for the 8K to complete or the socket buffer to fill
before posting a notification?
I would really appreciate if anyone with the detailed know-how of Windows
Sockets reply to this thread!
the criteria that triggers the recv notification to be posted by IOCP.
For example, if I post a WSARecv with 8K buffer and, lets suppose, my server
is connected with a client over a slow connection therefore it will take the
client a while to send 8K. How does winsock handles these situations? would
it wait for 8K buffer to be filled? would it just receive whatever bytes it
does and post a notification? or does it wait for a particular time-period
and fills buffers till then before posting a notification to IOCP?
I also read about posting zero-byte buffers on WSARecv to avoid memory being
locked into non-paged pools. Same question, when is the notification for
zero-byte buffers sent? let assume, the client sends 8K of data, now would
the notification be sent as soon as any data arrives on the socket even 100
bytes or would it wait for the 8K to complete or the socket buffer to fill
before posting a notification?
I would really appreciate if anyone with the detailed know-how of Windows
Sockets reply to this thread!