23.3.3 Summary
The main duty of a transport-layer protocol is to provide process-to-process commu-
nication. To define the processes, we need port numbers. The client program defines
itself with an ephemeral port number. The server defines itself with a well-known
port number. To send a message from one process to another, the transport-layer pro-
tocol encapsulates and decapsulates messages. The transport layer at the source per-
forms multiplexing; the transport layer at the destination performs demultiplexing
low control balances the exchange of data items between a producer and a consumer.
A transport-layer protocol can provide two types of services: connectionless and
connection-oriented. In a connectionless service, the sender sends packets to the
receiver without any connection establishment. In a connection-oriented service, the
client and the server first need to establish a connection between themselves.
We have discussed several common transport-layer protocols in this chapter. The
Stop-and-Wait protocol provides both flow and error control, but is inefficient. The
Go-Back- N protocol is the more efficient version of the Stop-and-Wait protocol and takes
advantage of pipelining. The Selective-Repeat protocol, a modification of the Go-Back- N
protocol, is better suited to handle packet loss. All of these protocols can be implemented
bidirectionally using piggybacking