SocketOptionLevel
Table of Contents
Introduction
The SocketOptionLevel
enumeration defines the protocol layer for which socket options are set or retrieved.
When you use the Socket.SetSocketOption or Socket.GetSocketOption methods, you pass a value from the SocketOptionLevel
enumeration to specify the protocol layer. The value you specify determines which options are available in the optionName
parameter.
Syntax
C#
Visual Basic
C++
C#
public enum SocketOptionLevel
Visual Basic
Public Enum SocketOptionLevel
C++
public enum class SocketOptionLevel
Members
Socket = 65535
Specifies socket options.
IP = 0
Specifies Internet Protocol (IP) options.
IPProtocol = 23
Specifies options for a specific IP protocol.
IPv6 = 41
Specifies Internet Protocol version 6 (IPv6) options.
Tcp = 6
Specifies Transmission Control Protocol (TCP) options.
Udp = 17
Specifies User Datagram Protocol (UDP) options.