According to http://support.microsoft.com/kb/156932 there are conditions under which an asynchronous Disk IO operation may complete synchronously. Is this only applicable to Disk IO or can similar conditions apply to Network IO?

UPDATE: i've tested this now with the debugger and have verified that 1) if there is data in the receive buffer the operation will complete synchronously 2) the IOCP will fire a callback regardless.

有帮助吗?

解决方案

Certainly, if for example you're reading data that is already present in the socket receive buffer. The real question is what difference would it make to you?

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top