Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Transmission Control Protocol
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Network function== The Transmission Control Protocol provides a communication service at an intermediate level between an application program and the Internet Protocol. It provides host-to-host connectivity at the [[transport layer]] of the [[Internet model]]. An application does not need to know the particular mechanisms for sending data via a link to another host, such as the required [[IP fragmentation]] to accommodate the [[maximum transmission unit]] of the transmission medium. At the transport layer, TCP handles all handshaking and transmission details and presents an abstraction of the network connection to the application typically through a [[network socket]] interface. At the lower levels of the protocol stack, due to [[network congestion]], traffic [[load balancing (computing)|load balancing]], or unpredictable network behavior, IP packets may be [[packet loss|lost]], duplicated, or [[out-of-order delivery|delivered out of order]]. TCP detects these problems, requests [[retransmission (data networks)|re-transmission]] of lost data, rearranges out-of-order data and even helps minimize network congestion to reduce the occurrence of the other problems. If the data still remains undelivered, the source is notified of this failure. Once the TCP receiver has reassembled the sequence of octets originally transmitted, it passes them to the receiving application. Thus, TCP [[Abstraction (computer science)|abstracts]] the application's communication from the underlying networking details. TCP is used extensively by many internet applications, including the [[World Wide Web]] (WWW), email, [[File Transfer Protocol]], [[Secure Shell]], [[peer-to-peer file sharing]], and [[streaming media]]. TCP is optimized for accurate delivery rather than timely delivery and can incur relatively long delays (on the order of seconds) while waiting for out-of-order messages or re-transmissions of lost messages. Therefore, it is not particularly suitable for real-time applications such as [[voice over IP]]. For such applications, protocols like the [[Real-time Transport Protocol]] (RTP) operating over the [[User Datagram Protocol]] (UDP) are usually recommended instead.<ref name=comer>{{cite book |last=Comer |first=Douglas E. |author-link=Douglas Comer |title=Internetworking with TCP/IP: Principles, Protocols, and Architecture |publisher=Prentice Hall |year=2006 |edition=5th |volume=1 |isbn=978-0-13-187671-2}}</ref> TCP is a [[reliable byte stream]] delivery service that guarantees that all bytes received will be identical and in the same order as those sent. Since packet transfer by many networks is not reliable, TCP achieves this using a technique known as ''positive acknowledgment with re-transmission''. This requires the receiver to respond with an [[acknowledgement (data networks)| acknowledgment]] message as it receives the data. The sender keeps a record of each packet it sends and maintains a timer from when the packet was sent. The sender re-transmits a packet if the timer expires before receiving the acknowledgment. The timer is needed in case a packet gets lost or corrupted.<ref name=comer/> While IP handles actual delivery of the data, TCP keeps track of ''segments'' β the individual units of data transmission that a message is divided into for efficient routing through the network. For example, when an HTML file is sent from a web server, the TCP software layer of that server divides the file into segments and forwards them individually to the [[internet layer]] in the [[network stack]]. The internet layer software encapsulates each TCP segment into an IP packet by adding a header that includes (among other data) the destination [[IP address]]. When the client program on the destination computer receives them, the TCP software in the transport layer re-assembles the segments and ensures they are correctly ordered and error-free as it streams the file contents to the receiving application.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)