Protocol (TCP). Reliable, two-way communication in a stream. You may use
this kind of socket in higher-level I/O function calls that involve the
FILE* type. This protocol offers you a virtual connection to the network
using ports and a dedicated client channel. After connection, the accept()
call returns new socket descriptor specifically for the new client.
Datagram Protocol (UDP). Unreliable connectionless communication. Each
message is independent and may be lost during transmission. This protocol
virtualizes the network with ports and allows you to send and receive messages
from many peers without reconnection.
Protocol (IP). Accesses the internal network interfaces and fields. If
you want to create ICMP messages, you need to create a raw socket. Root
Delivered Messages (RDM). Makes sure that each packet arrives safely to
the destination, but does not guarantee correct packet order. (Not yet
implemented in Linux and other Unix operating systems)
reliable, connection-based datagrams of fixed length. (Not yet implemented
Layer) Places the socket in promiscuous mode (if available) where it will
receive any and all packets on the network. This is a Linux-only tool.
Root-access only. (Deprecated—use PF_PACKET instead.)