SocketType Enum

Namespace: System.Net.Sockets

Indicates the transmission type of a socket.

C# VB.NET F#

Syntax

public enum SocketType

Members

Member name Description Value
Unknown The socket type is unknown. 0
Stream A connection-based socket that provides reliable, two-way, connection-based, byte streams. A Stream socket uses TCP/IP or the Datagram Protocol (UDP). 1
Dgram A connectionless socket that supports a datagram. Dgram is the only supported socket type for UDP. 2
Raw A raw socket that provides access to the underlying transport protocol or to a protocol that has not been encapsulated by a protocol header. 3
Rdm A reliable datagram socket. 4
Seqpacket A connection-based sequential packet socket. 5

Remarks

The SocketType enumeration is used to specify the type of socket to be created.

The specific values for SocketType are defined by the underlying operating system's socket API.

See also