Share via


SetSockOpt Method of the IFWXNetworkSocket Interface

The SetSockOpt method sets a socket option. This method is similar to the Winsock setsockopt function.

Syntax

HRESULT SetSockOpt(
  [in]  int level,
  [in]  int optname,
  [in]  CHAR* optval,
  [in]  int optlen
);

Parameters

  • level
    Level (type of socket) for which the option is defined. The supported levels include SOL_SOCKET and IPPROTO_TCP.

  • optname
    Socket option for which the value is to be set.

  • optval
    Pointer to the buffer in which the value for the requested option is supplied.

  • optlen
    Size, in bytes, of the optval buffer.

Return Value

This method returns S_OK if the call is successful; otherwise, it returns an error code.

For an IFWXNetworkSocket interface created by a call to IFWXSession::CreateNetworkSocket, this method returns E_NOTIMPL.

Requirements

Server Requires Windows Server 2008 R2 or Windows Server 2008 x64 Edition with SP2.
Version Requires Forefront Threat Management Gateway (TMG) 2010.
Header

Declared in Wspfwext.idl.

DLL

Requires Wspsrv.exe.

See Also

IFWXNetworkSocket

Send comments about this topic to Microsoft

Build date: 6/30/2010