Socket Type | Purpose |
SOCK_STREAM | Provides sequenced, reliable, two-way, connection-based byte streams. An out-of-band data transmission mechanism may be supported |
SOCK_DGRAM | Supports datagrams (connectionless, unreliable message of a fixed maximum length) |
SOCK_SEQPACKET | Provides a sequenced, reliable, two-way connection-based data transmission path for datagrams of fixed maximum length; a consumer is
required to read an entire packet with each input system call. |
SOCK_RAW | Provides raw network protocol access |
SOCK_RDM | Provides a reliable datagram layer that does not guarantee ordering |
SOCK_PACKET | Obsolute and should not be used in new programs |
SOCK_NONBLOCK | Set the O_NONBLOCK file status flag on the new open file description. |
SOCK_CLOEXEC | Set the close-on-exec (FD_CLOEXEC) flag on the new file descriptor. |