02Chapter 2: Ports, sockets and multiplexingThis chapter assumes you know the layered model (application, transport, network, link), what an IP address and a packet are, and basic Python. IP delivers a packet to a host. The transport layer must then deliver the data to the right program on that host. Ports and sockets make that possible.3 min read
03Chapter 3: Connectionless versus connection-oriented deliveryThis chapter assumes you know the layered network model (application, transport, network, link), what an IP address and a packet are, and basic Python. It explains the two delivery models that TCP and UDP represent. Later chapters cover the headers and mechanisms in detail.3 min read
04Chapter 4: UDP: independent datagrams with a minimal headerThis chapter assumes you know what an IP address and a packet are, and that you have seen ports and sockets. It also assumes basic Python. It covers how UDP delivers data, what its header contains, and the mistakes people commonly make with it.3 min read
05Chapter 5: Checksums and error detectionThis chapter assumes you know what a UDP datagram and a TCP segment are, and that you have seen the header fields from the earlier chapters. Both protocols carry a 16-bit checksum field. Here you will learn what it covers, how it is computed, and what it can and cannot catch.3 min read
06Chapter 6: TCP segments and the TCP headerThis chapter assumes you know the layered model, what an IP packet is, and what a port is. It covers how TCP packages a byte stream into segments and what the header fields do. The handshake, retransmission and windows get their own chapters. Here you only learn where each mechanism lives in the hea3 min read
07Chapter 7: Opening a connection: the three-way handshakeThis chapter assumes you know the layered network model, what an IP address and a packet are, and the idea of ports. It also assumes you can read basic Python.3 min read
08Chapter 8: How TCP delivers data reliably and in orderThis chapter assumes you know the layered network model, what an IP packet is, and how the three-way handshake opens a connection. IP is best-effort: packets can be lost, duplicated, delayed, or reordered. TCP builds a reliable, ordered byte stream on top of that using sequence numbers, acknowledgme3 min read
09Chapter 9: Byte stream versus message boundariesThis chapter assumes you know what a TCP segment is, how sequence numbers and acknowledgments give reliable, ordered delivery, and how a UDP datagram differs from a TCP connection. It also assumes basic Python socket code.3 min read
10Chapter 10: Flow control and the receive windowThis chapter assumes you know what a TCP segment is, how sequence numbers and acknowledgments work, and that TCP delivers a reliable byte stream. It covers how a receiver keeps a fast sender from overwhelming it.4 min read
11Chapter 11: Congestion control: slow start and congestion avoidanceThis chapter assumes you know how TCP uses sequence numbers, acknowledgments and retransmission, and how the receive window limits data in flight. It covers how a sender decides how fast to send when the network itself, not the receiver, is the limit.3 min read
12Chapter 12: Closing a connection and TCP statesThis chapter assumes you know the three-way handshake, sequence numbers and acknowledgments, and the basic sockets calls. It covers how a TCP connection ends, the states a connection passes through, and the errors that cause trouble in practice.3 min read
13Chapter 13: TCP and UDP in code with socketsThis chapter assumes you know the layered network model, what an IP address and a packet are, and basic Python. It shows how the TCP and UDP behavior from earlier chapters appears in the sockets API.2 min read
14Chapter 14: Choosing between TCP and UDPThis chapter assumes you know the layered network model, what an IP address and packet are, and the basics of the TCP handshake, sequence numbers, flow control and congestion control from earlier chapters. Here you turn that knowledge into a decision you can defend.3 min read