RIO_NOTIFICATION_COMPLETION_TYPE enumeration (mswsock.h)

The RIO_NOTIFICATION_COMPLETION_TYPE enumeration specifies the type of completion queue notifications to use with the RIONotify function when sending or receiving data using the Winsock registered I/O extensions.

Syntax

typedef enum _RIO_NOTIFICATION_COMPLETION_TYPE {
  RIO_EVENT_COMPLETION = 1,
  RIO_IOCP_COMPLETION = 2
} RIO_NOTIFICATION_COMPLETION_TYPE, *PRIO_NOTIFICATION_COMPLETION_TYPE;

Constants

 
RIO_EVENT_COMPLETION
Value: 1
An event handle is used to signal completion queue notifications.

An event handle is provided as the EventNotify.EventHandle member in the RIO_NOTIFICATION_COMPLETION structure passed to the RIOCreateCompletionQueue function when the RIO_CQ is created. The completion of the RIONotify function for this RIO_CQ will signal the event. The Event.NotifyReset member in the RIO_NOTIFICATION_COMPLETION structure passed to the RIOCreateCompletionQueue function when the RIO_CQ is created indicates whether or not the event should be reset as part of a call to the RIONotify function.
RIO_IOCP_COMPLETION
Value: 2
An I/O completion port handle is used to signal completion queue notifications.

An I/O completion port handle is provided as the Iocp.IocpHandle member in the RIO_NOTIFICATION_COMPLETION structure passed to the RIOCreateCompletionQueue function when the RIO_CQ is created. The completion of the RIONotify function for this RIO_CQ will queue an entry to the I/O completion port which can be retrieved using the GetQueuedCompletionStatus or GetQueuedCompletionStatusEx function. The queued entry will have the returned lpCompletionKey parameter value set to the value specified in the Iocp.CompletionKey member of the RIO_NOTIFICATION_COMPLETION and the returned lpOverlapped parameter value set to the value specified in the Iocp.Overlapped member in RIO_NOTIFICATION_COMPLETION structure. The Iocp.Overlapped member in the RIO_NOTIFICATION_COMPLETION will be a non-NULL value.

Remarks

The RIO_NOTIFICATION_COMPLETION_TYPE enumeration is used with the Winsock registered I/O extensions to specify the type of I/O completion to use with a RIO_CQ. An enumeration value is set in the RIO_NOTIFICATION_COMPLETION structure passed to the RIOCreateCompletionQueue function when the RIO_CQ is created.

When creating a RIO_CQ, the RIO_NOTIFICATION_COMPLETION structure determines how the application will receive completion queue notifications. If the RIO_NOTIFICATION_COMPLETION structure is provided when creating the completion queue, the application may call the RIONotify function to request a completion queue notification. Normally this notification occurs when the completion queue is not empty. This may happen immediately or when the next completion entry is inserted into the completion queue. Once a completion queue notification is issued, the application must call RIONotify in order to receive another completion queue notification.

Two options are available for completion queue notification.

  • Event handles.
  • I/O completion ports

If the Type member of the RIO_NOTIFICATION_COMPLETION structure is set to RIO_EVENT_COMPLETION, an event handle is used to signal completion queue notifications. An event handle is provided as the EventNotify.EventHandle member in the RIO_NOTIFICATION_COMPLETION structure passed to the RIOCreateCompletionQueue function.

If the Type member of the RIO_NOTIFICATION_COMPLETION structure is set to RIO_IOCP_COMPLETION, an I/O completion port is used to signal completion queue notifications. An I/O completion port handle is provided as the Iocp.IocpHandle member in the RIO_NOTIFICATION_COMPLETION structure passed to the RIOCreateCompletionQueue function. The completion of the RIONotify function for this RIO_CQ will queue an entry to the I/O completion port which can be retrieved using the GetQueuedCompletionStatus or GetQueuedCompletionStatusEx function.

Requirements

Requirement Value
Minimum supported client Windows 8 [desktop apps only]
Minimum supported server Windows Server 2012 [desktop apps only]
Header mswsock.h

See also

RIOCreateCompletionQueue

RIONotify

RIO_CQ

RIO_NOTIFICATION_COMPLETION