|
The Transmission Control Protocol (TCP) is one of the core protocols of the
Internet protocol suite.
Using TCP, applications on networked hosts can create connections to one another, over which they can exchange data or
packets.
The protocol guarantees reliable and in-order delivery of sender to
receiver data. TCP also distinguishes data for multiple, concurrent
applications (e.g. Web server and e-mail server) running on the same
host.
TCP supports many of the Internet's most popular application protocols and resulting applications, including the
World Wide Web,
e-mail and
Secure Shell.
In the Internet protocol suite,
TCP is the intermediate layer between the Internet Protocol
below it, and an application above it.
Applications often need reliable pipe-like connections
to each other, whereas the Internet Protocol does not provide such streams, but rather only
unreliable
packets.
TCP does the task of the transport layer in the
simplified OSI model of
computer networks.
Applications send streams of octets (8-bit
bytes)
to TCP for delivery through the network, and TCP divides the byte stream into appropriately sized
segments (usually delineated by the
maximum transmission unit (MTU) size of the
data link layer
of the network the computer is attached to). TCP then passes the
resulting packets to the Internet Protocol, for delivery through a
network to the TCP module of the entity at the other end. TCP checks to
make sure that no packets are lost by giving each packet a sequence number,
which is also used to make sure that the data are delivered to the
entity at the other end in the correct order. The TCP module at the far
end sends back an acknowledgement for packets which have been successfully received; a timer at the sending TCP will cause a timeout if
an acknowledgement is not received within a reasonable round-trip time
(or RTT), and the (presumably lost) data will then be re-transmitted. The TCP checks that no bytes are damaged by using a
checksum; one is computed at the sender for each block of
data before it is sent, and checked at the receiver.
|