Microsoft Internet Security and Acceleration Server 2000

IFWXConnection::EmulateConnection Method

Creates a connection to a client for a filter-emulated listening connection.

HRESULT EmulateConnection(
  IFWXDataFilter *piDataFilter,
  LPSOCKADDR RemoteAddress,
  DWORD RemoteAddressLength,
  LPSOCKADDR LocalAddress,
  DWORD LocalAddressLength,
  IFWXConnection **ppNewIFWXConnection
);

Parameters

piDataFilter
[in] Pointer to the IFWXDataFilter interface on the data filter that supplies the data for the connection. The data filter is installed with fwx_dfpc_Emulation priority, which is closest to the Internet. The data filter only receives an interface of an internal socket. An external socket is assumed to be held by the caller.
RemoteAddress
[in] Pointer to a sockaddr structure that contains the address of the remote socket that is connecting to the client. This address is set in the output parameter of accept and getpeername functions on the client.
RemoteAddressLength
[in] Length, in bytes, of the RemoteAddress parameter.
LocalAddress
[in] Pointer to a sockaddr structure that contains the local proxy address that is used for the connection. This is the address that the getsockname function returns to the client.
LocalAddressLength
[in] Length, in bytes, of the LocalAddress parameter.
ppNewIFWXConnection
[out] Pointer to a variable that receives an IFWXConnection interface pointer on the connection object that is created for this new connection. The parameter can be NULL. The reference to the new connection object must not be held after a fwx_ConnectionTerminating event for that connection is received.

Remarks

This method may be called only if this connection is in the listening state, and the caller is a filter that is emulating the listening state for the connection. Clients use the emulated connection, so that, effectively, only one real connection is used.