We can distinguish between the following three types of sockets, which are characterized by connection modes:
- Stream sockets: These are connection-oriented sockets, and they are based on reliable protocols such as TCP or SCTP.
- Datagram sockets: These are not connection-oriented (connectionless) sockets, and are based on the fast but unreliable UDP protocol.
- Raw socket (raw IP): The transport level is bypassed, and the header is accessible at the application level.