IFWXAcceptCompletion::CompleteAsyncAccept method

Applies to: desktop apps only

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).

Syntax

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
);

Parameters

  • fSuccess [in]
    Success flag. If TRUE, the IFWXNetworkSocket::Accept method succeeded. If FALSE, the method failed.

  • Win32ErrorCode [in]
    Windows error code. This parameter is defined only if the fSuccess parameter is set to FALSE.

  • pListeningSocket [in]
    Pointer to the IFWXNetworkSocket interface on the listening socket.

  • pAcceptSocket [in]
    Pointer to the IFWXNetworkSocket interface on the newly accepted connection.

  • RemoteAddress [in]
    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.

  • RemoteAddressLength [in]
    Size, in bytes, of the buffer pointed to by the RemoteAddress parameter.

  • LocalAddress [in]
    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.

  • LocalAddressLength [in]
    Size, in bytes, of the buffer to which the LocalAddress parameter points.

  • UserData [in]
    The UserData parameter that was supplied to the IFWXNetworkSocket::Accept method.

Return value

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.

Remarks

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.

Requirements

Minimum supported client

None supported

Minimum supported server

Windows Server 2008 R2, Windows Server 2008 with SP2 (64-bit only)

Version

Forefront Threat Management Gateway (TMG) 2010

Header

Wspfwext.idl

See also

IFWXAcceptCompletion

 

 

Build date: 7/12/2010