Overlapped Completion Indication Mechanisms
A version of this page is also available for
4/8/2010
The particular overlapped I/O completion indication to be used for a given overlapped operation is determined by whether the application supplies a pointer to a completion function, whether a WSAOVERLAPPED structure is referenced, and by the value of the hEvent member within the WSAOVERLAPPED structure, if it is supplied. The following table summarizes the completion semantics for an overlapped socket and shows the various combinations of lpOverlapped, hEvent, and lpCompletionRoutine.
LpOverlapped | HEvent | lpCompletionRoutine | Completion indication |
---|---|---|---|
NULL |
Not applicable |
Ignored |
Operation completes synchronously. It behaves as if it were a nonoverlapped socket. |
!NULL |
NULL |
NULL |
Operation completes overlapped, but there is no Winsock 2.2 -supported completion mechanism. The completion port mechanism (if supported) can be used in this case. Otherwise, there is no completion notification. |
!NULL |
!NULL |
NULL |
Operation completes overlapped, notification by signaling event object. |
!NULL |
Ignored |
!NULL |
Operation completes overlapped, notification by scheduling completion routine. |