Microsoft Internet Security and Acceleration Server 2004 SDK

IFWXSession::CreateNetworkSocket

The CreateNetworkSocket method creates a TCP/IP socket that is associated with this session.

HRESULT CreateNetworkSocket(
  INT Protocol,
  IFWXNetworkSocket** piSocket
);

Parameters

Protocol
[in] Protocol flags. This parameter can have the following flag values:
Value Meaning
FWX_PROTOCOL_TCP The method will create a TCP socket.
FWX_PROTOCOL_UDP The method will create a UDP socket.
piSocket
[out] Address of a variable that receives a pointer to the IFWXNetworkSocket interface.

Return Values

S_OK
The socket was created.
E_OUTOFMEMORY
Insufficient memory or resources to process the event. The socket was not created.
HRESULT_FROM_WIN32(win32 error code)
Winsock or Windows error code. The method failed and the socket was not created.

Remarks

The socket created by this method is user specific, and obeys the policy rules for the session. Connections are logged as if they were performed by the session's user.

To create a socket that is not user specific, use IFWXFirewall::CreateNetworkSocket.

Requirements

Server: Requires Windows Server 2003 or Windows 2000.
Version: Requires Internet Security and Acceleration Server 2004.
Header: Declared in Wspfwext.idl.

See Also

IFWXSession, IFWXFirewall::CreateNetworkSocket