Microsoft Internet Security and Acceleration Server 2000

IFWXAcceptCompletion::CompleteAsyncAccept Method

This method is called when the IFWXNetworkSocket::Accept method completes (when a client connects to the socket).

HRESULT CompleteAsyncAccept(
  BOOL fSuccess,
  DWORD Win32ErrorCode,
  INetworkSocket *pListeningSocket,
  INetworkSocket *pAcceptSocket,
  LPSOCKADDR RemoteAddress,
  DWORD RemoteAddressLength,
  LPSOCKADDR LocalAddress,
  DWORD LocalAddressLength,
  UserContextType UserData
);

Parameters

fSuccess
[in] Success flag. If TRUE, the IFWXNetworkSocket::Accept method succeeded. If FALSE, it failed.
Win32ErrorCode
[in] Win32 error code. This parameter is defined only if the fSuccess parameter is 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 passed to the IFWXNetworkSocket::Accept method.

Return Values

S_OK
The method succeeded.

Any error should be handled with this method.

Remarks

The UserData parameter provides a context to the notification. You can use the same notification interface for completion notifications from distinct network socket objects and differentiate among them by using different values for UserData.