Time-Out on Overlapped I/O

Hello,

I am writing a server using completion routine call back on a non blocking ReadFileEx.

Can the programmer of the server side rely on the fact that the completion routine will NEVER be called until the client side executes a WriteFileEx?

If it is not the case, I guess that the completion routine will be called either if the client side or the server side executes a ShutDown ou a CloseSocket, or if the Windows system has a kind of time-out on the call back. This latter case is my real question. Does-it exists such a timeout and is there a way to set it to infinity.

Thank you,
Eric

[606 byte] By [Eric123456] at [2008-2-6]
# 1
Yes, all overlapped operations have an infinite timeout until a condition of their completion is satisfied. For your ReadFileEx, this is either the peer sending data (via any mechanism - blocking, non-blocking, async, etc.) or under an error condition. Shutting down or closing the socket is one such error condition (as the operation will be aborted) or any general network failure that causes the connection (I assume this is TCP) to be reset.
AnthonyJones at 2007-9-4 > top of Msdn Tech,Windows Networking Development,Winsock Kernel (WSK)...