The CompleteAsyncAccept method receives a notification that the work performed in a call to the IFWXNetworkSocket::Accept method is completed (that a client connected to the listening socket).
HRESULT CompleteAsyncAccept( [in] BOOL fSuccess, [in] DWORD Win32ErrorCode, [in] IFWXNetworkSocket* pListeningSocket, [in] IFWXNetworkSocket* pAcceptSocket, [in] LPSOCKADDR RemoteAddress, [in] DWORD RemoteAddressLength, [in] LPSOCKADDR LocalAddress, [in] DWORD LocalAddressLength, [in] UserContextType UserData );
Success flag. If TRUE, the IFWXNetworkSocket::Accept method succeeded. If FALSE, the method failed.
Windows error code. This parameter is defined only if the fSuccess parameter is set to FALSE.
Pointer to the IFWXNetworkSocket interface on the listening socket.
Pointer to the IFWXNetworkSocket interface on the newly accepted connection.
Pointer to a sockaddr structure that contains the remote address of the connection. This is the same information that would be returned by the Windows Sockets (Winsock) getpeername function.
Size, in bytes, of the buffer pointed to by the RemoteAddress parameter.
Pointer to a sockaddr structure that contains the local address of the connection. This is the same information that would be returned by the Winsock getsockname function.
Size, in bytes, of the buffer to which the LocalAddress parameter points.
The UserData parameter that was supplied to the IFWXNetworkSocket::Accept method.
Implementations of this method should handle any run-time error and return S_OK. By itself the return value has no effect on the Firewall’s operation. Whether the Accept Operation completed successfully or not (indicated by the fSuccess parameter), it is legal for the implementation to issue another Accept() request or close the listening socket.
The UserData parameter provides a context to the notification. You can use the same notification interface for receiving completion notifications from different network socket objects and differentiate among them by using different values for UserData.
Server | Requires Windows Server 2008. |
---|---|
Version | Requires Forefront Threat Management Gateway (TMG). |
Header |
Declared in Wspfwext.idl. |
Send comments about this topic to Microsoft
Build date: 11/30/2009
© 2008 Microsoft Corporation. All rights reserved.