Layer 4 — Transport
TCP, UDP, ports, handshakes, flow control, and how data is reliably (or not) delivered end to end.
TCP — Reliable Delivery at the Transport Layer
TCPHow TCP establishes connections, guarantees delivery order, controls flow, and tears down sessions — and what all of that looks like on the wire.
UDP — Fast, Stateless Transport
UDPHow UDP delivers datagrams without connection setup, acknowledgment, or ordering — why this simplicity makes it the right choice for real-time applications, DNS, and any protocol that builds its own reliability layer.
TCP vs UDP — Choosing the Right Transport
TCP-VS-UDPA direct comparison of TCP and UDP across reliability, latency, overhead, and real-world application fit — and when the right answer is neither, and you should build on UDP with a custom protocol like QUIC.
Ports & Sockets — Multiplexing Transport Connections
PORTS-SOCKETSHow port numbers identify services and distinguish connections on the same IP address, what a socket is and how the 5-tuple uniquely identifies every TCP connection, and the difference between well-known, registered, and ephemeral port ranges.
RTP — Real-Time Transport Protocol
RTPHow RTP carries real-time audio and video over UDP, what the RTP header provides for jitter compensation and payload identification, and how RTCP provides feedback and synchronization between media streams.