TCP Reliable Stream Service
The Transmission Control Protocol (TCP) provides a logical full-duplex (two-way) connection between two application layer processes across a datagram network. TCP provides these application processes with a connection-oriented, reliable, in-sequence, byte-stream service. TCP also provides flow control that allows receivers to control the rate at which the sender transmits information so that buffers do not overflow. TCP can also support multiple application processes in the same end system.6
Before data transfer can begin, TCP establishes a connection between the two application processes by setting up variables that are used in the protocol. These variables are stored in a connection record that is called the transmission control block (TCB). Once the connection is established, TCP delivers data over each direction in the connection correctly and in sequence. TCP was designed to operate over the Internet Protocol (IP) and does not assume that the underlying network service is reliable. To implement reliability, TCP uses a form of Selective Repeat ARQ. TCP terminates each direction of the connection independently,
6TCP also implements congestion control, but this function is discussed in Chapter 7.
allowing data to continue flowing in one direction after the other direction has been closed.
TCP does not preserve message boundaries and treats the data it gets from the application layer as a byte stream. Thus when a source sends a 1000-byte message in a single chunk (one write), the destination may receive the message in two chunks of 500 bytes each (two reads), in three chunks of 400 bytes, 300 bytes and 300 bytes (three reads), or in any other combination. In other words, TCP may split or combine the application information in the way it finds most appropriate for the underlying network.
In this section we first discuss how TCP provides reliable stream service. We then discuss details of the TCP header and protocol.
Post a comment