Completion Notification Objects

Completion notification objects work with completion port objects, also known as I/O completion port objects, to allow the operating system to handle multiple threads efficiently for asynchronous I/O. The Microsoft Firewall service completion port is a completion port requested by the Firewall service from the Windows Server operating system that remains associated with the service. The completion port is associated with a number of client connections. All I/O operations should make use of the Firewall service completion port so that I/O operations take place efficiently.

To use a completion port, you must provide an I/O completion notification object that will receive notification when the I/O operation is completed. Hook the handle to the Firewall service completion port by using the IFWXFirewall::HookToCompletionPort method. The Firewall service provides the overlapped object, completion port de-queuing, and the thread pool. To receive notification that the I/O is completed, use the IFWXOverlapped::SetNotificationInterface method.

When an asynchronous I/O operation has been completed on a particular connection, the Firewall service notifies the completion port by using one of these completion notification methods:

Each of these methods includes a Boolean succeed/fail parameter, a Windows error code parameter, and a user-data parameter that provides user-context information. However, the method used by the Firewall service to send the notification depends on the type of I/O operation that has been completed.

IFWXIOCompletion::CompleteAsyncIO is the general method for receiving notification from the Firewall service when an asynchronous I/O operation is completed. When a data buffer has been completed through an asynchronous I/O operation, the notification is sent to IFWXIOCompletion::CompleteAsyncIO.

IFWXAcceptCompletion::CompleteAsyncAcceptis the method for receiving notifications from the Firewall service when an IFWXNetworkSocket:Accept is completed on a listening socket.

Send comments about this topic to Microsoft

Build date: 11/30/2009

© 2008 Microsoft Corporation. All rights reserved.