System.Net.Sockets.SocketOptionName Enum

public enum SocketOptionName

Base Types

Object
  ValueType
    Enum
      SocketOptionName

Assembly

System

Library

Networking

Summary

Specifies option names for use in the System.Net.Sockets.Socket.SetSocketOption(System.Net.Sockets.SocketOptionLevel,System.Net.Sockets.SocketOptionName,System.Int32) and System.Net.Sockets.Socket.GetSocketOption(System.Net.Sockets.SocketOptionLevel,System.Net.Sockets.SocketOptionName) methods of the Socket class.

Description

Socket options determine the behavior of an instance of the Socket class. Some socket options apply only to specific protocols while others apply to all types. Members of the SocketOptionLevel enumeration specify which protocol applies to a specific socket option.

See Also

System.Net.Sockets Namespace

Members

SocketOptionName Fields

SocketOptionName.AcceptConnection Field
SocketOptionName.AddMembership Field
SocketOptionName.AddSourceMembership Field
SocketOptionName.BlockSource Field
SocketOptionName.Broadcast Field
SocketOptionName.BsdUrgent Field
SocketOptionName.ChecksumCoverage Field
SocketOptionName.Debug Field
SocketOptionName.DontFragment Field
SocketOptionName.DontLinger Field
SocketOptionName.DontRoute Field
SocketOptionName.DropMembership Field
SocketOptionName.DropSourceMembership Field
SocketOptionName.Error Field
SocketOptionName.ExclusiveAddressUse Field
SocketOptionName.Expedited Field
SocketOptionName.HeaderIncluded Field
SocketOptionName.IPOptions Field
SocketOptionName.IpTimeToLive Field
SocketOptionName.KeepAlive Field
SocketOptionName.Linger Field
SocketOptionName.MaxConnections Field
SocketOptionName.MulticastInterface Field
SocketOptionName.MulticastLoopback Field
SocketOptionName.MulticastTimeToLive Field
SocketOptionName.NoChecksum Field
SocketOptionName.NoDelay Field
SocketOptionName.OutOfBandInline Field
SocketOptionName.PacketInformation Field
SocketOptionName.ReceiveBuffer Field
SocketOptionName.ReceiveLowWater Field
SocketOptionName.ReceiveTimeout Field
SocketOptionName.ReuseAddress Field
SocketOptionName.SendBuffer Field
SocketOptionName.SendLowWater Field
SocketOptionName.SendTimeout Field
SocketOptionName.Type Field
SocketOptionName.TypeOfService Field
SocketOptionName.UnblockSource Field
SocketOptionName.UseLoopback Field
SocketOptionName.value__ Field


SocketOptionName.AcceptConnection Field

AcceptConnection = 2;

Summary

System.Net.Sockets.Socket.Listen(System.Int32) has been called on the socket.

The value associated with this option is a Boolean data type.

The System.Net.Sockets.SocketOptionLevel.Socket value of the SocketOptionLevel enumeration applies to this option.

See Also

System.Net.Sockets.SocketOptionName Enum, System.Net.Sockets Namespace

SocketOptionName.AddMembership Field

AddMembership = 12;

Summary

Add an IP group membership.

The value associated with this option is an instance of the MulticastOption class.

The System.Net.Sockets.SocketOptionLevel.IP value of the SocketOptionLevel enumeration applies to this option.

See Also

System.Net.Sockets.SocketOptionName Enum, System.Net.Sockets Namespace

SocketOptionName.AddSourceMembership Field

AddSourceMembership = 15;

Summary

Join a source group.

The value associated with this option is an instance of the IPAddress class.

The System.Net.Sockets.SocketOptionLevel.IP value of the SocketOptionLevel enumeration applies to this option.

See Also

System.Net.Sockets.SocketOptionName Enum, System.Net.Sockets Namespace

SocketOptionName.BlockSource Field

BlockSource = 17;

Summary

Block data from a source.

The value associated with this option is a Boolean data type.

The System.Net.Sockets.SocketOptionLevel.IP value of the SocketOptionLevel enumeration applies to this option.

See Also

System.Net.Sockets.SocketOptionName Enum, System.Net.Sockets Namespace

SocketOptionName.Broadcast Field

Broadcast = 32;

Summary

Permit sending broadcast messages on the socket.

The value associated with this option is a Boolean data type.

The System.Net.Sockets.SocketOptionLevel.Socket value of the SocketOptionLevel enumeration applies to this option.

See Also

System.Net.Sockets.SocketOptionName Enum, System.Net.Sockets Namespace

SocketOptionName.BsdUrgent Field

BsdUrgent = 2;

Summary

Use urgent data as defined by IETF RFC 1222. This option can be set only once, and once set, cannot be turned off.

The value associated with this option is a Boolean data type.

The System.Net.Sockets.SocketOptionLevel.Tcp value of the SocketOptionLevel enumeration applies to this option.

See Also

System.Net.Sockets.SocketOptionName Enum, System.Net.Sockets Namespace

SocketOptionName.ChecksumCoverage Field

ChecksumCoverage = 20;

Summary

Set or get UDP checksum coverage.

The value associated with this option is a Boolean data type.

The System.Net.Sockets.SocketOptionLevel.Udp value of the SocketOptionLevel enumeration applies to this option.

See Also

System.Net.Sockets.SocketOptionName Enum, System.Net.Sockets Namespace

SocketOptionName.Debug Field

Debug = 1;

Summary

Record debugging information when available.

The value associated with this option is a Boolean data type.

The System.Net.Sockets.SocketOptionLevel.Socket value of the SocketOptionLevel enumeration applies to this option.

See Also

System.Net.Sockets.SocketOptionName Enum, System.Net.Sockets Namespace

SocketOptionName.DontFragment Field

DontFragment = 14;

Summary

Do not fragment IP datagrams.

The value associated with this option is a Boolean data type.

The System.Net.Sockets.SocketOptionLevel.IP value of the SocketOptionLevel enumeration applies to this option.

See Also

System.Net.Sockets.SocketOptionName Enum, System.Net.Sockets Namespace

SocketOptionName.DontLinger Field

DontLinger = -129;

Summary

Close socket gracefully without lingering.

The value associated with this option is a Boolean data type.

The System.Net.Sockets.SocketOptionLevel.Socket value of the SocketOptionLevel enumeration applies to this option.

See Also

System.Net.Sockets.SocketOptionName Enum, System.Net.Sockets Namespace

SocketOptionName.DontRoute Field

DontRoute = 16;

Summary

Do not route; send directly to interface addresses.

The value associated with this option is a Boolean data type.

The System.Net.Sockets.SocketOptionLevel.Socket value of the SocketOptionLevel enumeration applies to this option.

See Also

System.Net.Sockets.SocketOptionName Enum, System.Net.Sockets Namespace

SocketOptionName.DropMembership Field

DropMembership = 13;

Summary

Drop an IP group membership.

The value associated with this option is an instance of the MulticastOption class.

The System.Net.Sockets.SocketOptionLevel.IP value of the SocketOptionLevel enumeration applies to this option.

See Also

System.Net.Sockets.SocketOptionName Enum, System.Net.Sockets Namespace

SocketOptionName.DropSourceMembership Field

DropSourceMembership = 16;

Summary

Drop a source group.

The value associated with this option is an instance of the IPAddress class.

The System.Net.Sockets.SocketOptionLevel.IP value of the SocketOptionLevel enumeration applies to this option.

See Also

System.Net.Sockets.SocketOptionName Enum, System.Net.Sockets Namespace

SocketOptionName.Error Field

Error = 4103;

Summary

Get the error status code, then clear the code.

The value associated with this option is a Int32 data type.

The System.Net.Sockets.SocketOptionLevel.Socket value of the SocketOptionLevel enumeration applies to this option.

See Also

System.Net.Sockets.SocketOptionName Enum, System.Net.Sockets Namespace

SocketOptionName.ExclusiveAddressUse Field

ExclusiveAddressUse = -5;

Summary

Enable a socket to be bound for exclusive access.

The value associated with this option is a Boolean data type.

The System.Net.Sockets.SocketOptionLevel.Socket value of the SocketOptionLevel enumeration applies to this option.

See Also

System.Net.Sockets.SocketOptionName Enum, System.Net.Sockets Namespace

SocketOptionName.Expedited Field

Expedited = 2;

Summary

Use expedited data as defined by IETF RFC 1222. This option can be set only once, and once set, cannot be turned off.

The value associated with this option is a Boolean data type.

The System.Net.Sockets.SocketOptionLevel.Tcp value of the SocketOptionLevel enumeration applies to this option.

See Also

System.Net.Sockets.SocketOptionName Enum, System.Net.Sockets Namespace

SocketOptionName.HeaderIncluded Field

HeaderIncluded = 2;

Summary

Application is providing the IP header for outgoing datagrams.

The value associated with this option is a Boolean data type.

The System.Net.Sockets.SocketOptionLevel.IP value of the SocketOptionLevel enumeration applies to this option.

See Also

System.Net.Sockets.SocketOptionName Enum, System.Net.Sockets Namespace

SocketOptionName.IPOptions Field

IPOptions = 1;

Summary

Specifies IP options to be inserted into outgoing datagrams.

The value associated with this option is a Byte array.

The System.Net.Sockets.SocketOptionLevel.IP value of the SocketOptionLevel enumeration applies to this option.

See Also

System.Net.Sockets.SocketOptionName Enum, System.Net.Sockets Namespace

SocketOptionName.IpTimeToLive Field

IpTimeToLive = 4;

Summary

Set the IP header time-to-live field.

The value associated with this option is a Int32 data type.

The System.Net.Sockets.SocketOptionLevel.IP value of the SocketOptionLevel enumeration applies to this option.

See Also

System.Net.Sockets.SocketOptionName Enum, System.Net.Sockets Namespace

SocketOptionName.KeepAlive Field

KeepAlive = 8;

Summary

Send keep-alives.

The value associated with this option is a Boolean data type.

The System.Net.Sockets.SocketOptionLevel.Socket value of the SocketOptionLevel enumeration applies to this option.

See Also

System.Net.Sockets.SocketOptionName Enum, System.Net.Sockets Namespace

SocketOptionName.Linger Field

Linger = 128;

Summary

Linger on close if unsent data is present.

The value associated with this option is an instance of the LingerOption class.

The System.Net.Sockets.SocketOptionLevel.Socket value of the SocketOptionLevel enumeration applies to this option.

See Also

System.Net.Sockets.SocketOptionName Enum, System.Net.Sockets Namespace

SocketOptionName.MaxConnections Field

MaxConnections = 2147483647;

Summary

Maximum queue length that can be specified by System.Net.Sockets.Socket.Listen(System.Int32).

The value associated with this option is a Int32 data type.

See Also

System.Net.Sockets.SocketOptionName Enum, System.Net.Sockets Namespace

SocketOptionName.MulticastInterface Field

MulticastInterface = 9;

Summary

Set the interface for outgoing multicast packets.

The value associated with this option is a Byte array.

The System.Net.Sockets.SocketOptionLevel.IP value of the SocketOptionLevel enumeration applies to this option.

See Also

System.Net.Sockets.SocketOptionName Enum, System.Net.Sockets Namespace

SocketOptionName.MulticastLoopback Field

MulticastLoopback = 11;

Summary

IP multicast loopback.

The value associated with this option is a Boolean data type.

The System.Net.Sockets.SocketOptionLevel.IP value of the SocketOptionLevel enumeration applies to this option.

See Also

System.Net.Sockets.SocketOptionName Enum, System.Net.Sockets Namespace

SocketOptionName.MulticastTimeToLive Field

MulticastTimeToLive = 10;

Summary

IP multicast time to live.

The value associated with this option is a Int32 data type.

The System.Net.Sockets.SocketOptionLevel.IP value of the SocketOptionLevel enumeration applies to this option.

See Also

System.Net.Sockets.SocketOptionName Enum, System.Net.Sockets Namespace

SocketOptionName.NoChecksum Field

NoChecksum = 1;

Summary

Send UDP datagrams with checksum set to zero.

The value associated with this option is a Boolean data type.

The System.Net.Sockets.SocketOptionLevel.Udp value of the SocketOptionLevel enumeration applies to this option.

See Also

System.Net.Sockets.SocketOptionName Enum, System.Net.Sockets Namespace

SocketOptionName.NoDelay Field

NoDelay = 1;

Summary

Disable the Nagle algorithm for send coalescing.

The value associated with this option is a Boolean data type.

The System.Net.Sockets.SocketOptionLevel.Tcp value of the SocketOptionLevel enumeration applies to this option.

See Also

System.Net.Sockets.SocketOptionName Enum, System.Net.Sockets Namespace

SocketOptionName.OutOfBandInline Field

OutOfBandInline = 256;

Summary

Receive out-of-band data in the normal data stream.

The value associated with this option is a Boolean data type.

The System.Net.Sockets.SocketOptionLevel.Socket value of the SocketOptionLevel enumeration applies to this option.

See Also

System.Net.Sockets.SocketOptionName Enum, System.Net.Sockets Namespace

SocketOptionName.PacketInformation Field

PacketInformation = 19;

Summary

Return information about received packets.

See Also

System.Net.Sockets.SocketOptionName Enum, System.Net.Sockets Namespace

SocketOptionName.ReceiveBuffer Field

ReceiveBuffer = 4098;

Summary

Specifies the total per-socket buffer space reserved for receives. This is unrelated to the maximum message size or the size of a TCP window.

The value associated with this option is a Int32 data type.

The System.Net.Sockets.SocketOptionLevel.Socket value of the SocketOptionLevel enumeration applies to this option.

See Also

System.Net.Sockets.SocketOptionName Enum, System.Net.Sockets Namespace

SocketOptionName.ReceiveLowWater Field

ReceiveLowWater = 4100;

Summary

Receive low water mark.

The value associated with this option is a Int32 data type.

See Also

System.Net.Sockets.SocketOptionName Enum, System.Net.Sockets Namespace

SocketOptionName.ReceiveTimeout Field

ReceiveTimeout = 4102;

Summary

Specifies the maximum time, in milliseconds, the System.Net.Sockets.Socket.Receive(System.Byte[],System.Int32,System.Net.Sockets.SocketFlags) and System.Net.Sockets.Socket.ReceiveFrom(System.Byte[],System.Int32,System.Int32,System.Net.Sockets.SocketFlags,System.Net.EndPoint@) methods will block when attempting to receive data. If data is not received within this time, a SocketException exception is thrown.

The value associated with this option is a Int32 data type.

The System.Net.Sockets.SocketOptionLevel.Socket value of the SocketOptionLevel enumeration applies to this option.

See Also

System.Net.Sockets.SocketOptionName Enum, System.Net.Sockets Namespace

SocketOptionName.ReuseAddress Field

ReuseAddress = 4;

Summary

Allow the socket to be bound to an address that is already in use.

The value associated with this option is a Boolean data type.

The System.Net.Sockets.SocketOptionLevel.Socket value of the SocketOptionLevel enumeration applies to this option.

See Also

System.Net.Sockets.SocketOptionName Enum, System.Net.Sockets Namespace

SocketOptionName.SendBuffer Field

SendBuffer = 4097;

Summary

Specifies the total per-socket buffer space reserved for sends. This is unrelated to the maximum message size or the size of a TCP window.

The value associated with this option is a Int32 data type.

The System.Net.Sockets.SocketOptionLevel.Socket value of the SocketOptionLevel enumeration applies to this option.

See Also

System.Net.Sockets.SocketOptionName Enum, System.Net.Sockets Namespace

SocketOptionName.SendLowWater Field

SendLowWater = 4099;

Summary

Send low water mark.

The value associated with this option is a Int32 data type.

See Also

System.Net.Sockets.SocketOptionName Enum, System.Net.Sockets Namespace

SocketOptionName.SendTimeout Field

SendTimeout = 4101;

Summary

Specifies the maximum time, in milliseconds, the System.Net.Sockets.Socket.Send(System.Byte[],System.Int32,System.Net.Sockets.SocketFlags) and System.Net.Sockets.Socket.SendTo(System.Byte[],System.Int32,System.Int32,System.Net.Sockets.SocketFlags,System.Net.EndPoint) methods will block when attempting to send data. If data is not sent within this time, a SocketException exception is thrown.

The value associated with this option is a Int32 data type.

The System.Net.Sockets.SocketOptionLevel.Socket member of the SocketOptionLevel enumeration applies to this option.

See Also

System.Net.Sockets.SocketOptionName Enum, System.Net.Sockets Namespace

SocketOptionName.Type Field

Type = 4104;

Summary

Get the socket type, one of the members of the SocketType enumeration.

The value associated with this option is a Int32 data type.

The System.Net.Sockets.SocketOptionLevel.Socket value of the SocketOptionLevel enumeration applies to this option.

See Also

System.Net.Sockets.SocketOptionName Enum, System.Net.Sockets Namespace

SocketOptionName.TypeOfService Field

TypeOfService = 3;

Summary

Change the IP header type of service field.

The System.Net.Sockets.SocketOptionLevel.IP value of the SocketOptionLevel enumeration applies to this option.

See Also

System.Net.Sockets.SocketOptionName Enum, System.Net.Sockets Namespace

SocketOptionName.UnblockSource Field

UnblockSource = 18;

Summary

Unblock a previously blocked source.

The value associated with this option is a Boolean data type.

The System.Net.Sockets.SocketOptionLevel.IP value of the SocketOptionLevel enumeration applies to this option.

See Also

System.Net.Sockets.SocketOptionName Enum, System.Net.Sockets Namespace

SocketOptionName.UseLoopback Field

UseLoopback = 64;

Summary

Bypass hardware when possible.

The value associated with this option is a Boolean data type.

The System.Net.Sockets.SocketOptionLevel.IP value of the SocketOptionLevel enumeration applies to this option.

See Also

System.Net.Sockets.SocketOptionName Enum, System.Net.Sockets Namespace

SocketOptionName.value__ Field

value__;

See Also

System.Net.Sockets.SocketOptionName Enum, System.Net.Sockets Namespace