Share via


Socket.SetSocketOption Method (SocketOptionLevel, SocketOptionName, Int32)

Sets the specified integer configuration option for the current socket.

Namespace: System.Net.Sockets
Assembly: System (in system.dll)

Syntax

public void SetSocketOption (
         SocketOptionLeveloptionLevel,
         SocketOptionNameoptionName,
         intoptionValue
)

Parameters

  • optionLevel
    A value of the SocketOptionLevel enumeration that specifies the protocol to which the socket configuration option applies.
  • optionName
    A value of the SocketOptionName enumeration that specifies the socket configuration option to be set.
  • optionValue
    The numeric value to which the specified configuration option is set.

Remarks

Use the GetSocketOption method to retrieve the value of a configuration option.

Version Information

Available in .NET Micro Framework version 2.0, 2.5

See Also

Reference

Socket Class
Socket Members
System.Net.Sockets Namespace