Microsoft Internet Security and Acceleration Server 2000

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. For more information on use of completion ports in Windows, see MSDN. The firewall service completion port is a completion port requested by the Firewall service from Windows 2000 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 need to provide an I/O Completion Notification object that will receive notification when the I/O operation has 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 has been completed, use the IFWXOverlapped::SetNotificationInterface method.

Asynchronous I/O and Completion Ports

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

Each of these methods includes a Boolean succeed/fail parameter, a Win32® 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

This 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::CompleteAsyncAccept

This method receives notifications from the Firewall service when an IFWXNetworkSocket:Accept is completed on a listening socket.