The WSACOMPLETION structure specifies completion notification settings for I/O control calls made to a registered namespace.
typedef enum _WSACOMPLETIONTYPE
{
NSP_NOTIFY_IMMEDIATELY = 0,
NSP_NOTIFY_HWND,
NSP_NOTIFY_EVENT,
NSP_NOTIFY_PORT,
NSP_NOTIFY_APC
} WSACOMPLETIONTYPE, *PWSACOMPLETIONTYPE, *LPWSACOMPLETIONTYPE;
The WSACOMPLETION structure enables callbacks to be provided in any of the following formats, based on the value provided in Type:
| Callback Format | Type value |
|---|---|
| Polling | NSP_NOTIFY_IMMEDIATELY |
| Window Message | NSP_NOTIFY_HWND |
| Event | NSP_NOTIFY_EVENT |
| APC | NSP_NOTIFY_APC |
| Completion Port | NSP_NOTIFY_PORT |
For a blocking function, set the WSACOMPLETION structure to null.
| Constant | Description |
|---|---|
| NSP_NOTIFY_IMMEDIATELY | |
| NSP_NOTIFY_HWND | |
| NSP_NOTIFY_EVENT | |
| NSP_NOTIFY_PORT | |
| NSP_NOTIFY_APC |
Header: Declared in winsock2.h.
Library: Use ws2_32.lib.