TCP

From SEGGER Knowledge Base
Jump to navigation Jump to search

Transmission Control Protocol (TCP) is a connection-oriented protocol used between two network participants where one participant acts as server, listening to incoming connections, and the other as client, establishing a connection to a server. Once a connection is established, both sides are able to send and receive freely.

TCP protects against packet loss using an acknowledgment mechanism (ACK). It does not rely on sending only one packet per ACK; instead, multiple packets can be sent before acknowledgments are received. If packets are lost during a session, they can be retransmitted because each side keeps track of which data has already been acknowledged by the other side. TCP is well suited for data transfers where reliability is essential and no data should be lost. Many application-layer protocols use TCP, including HTTP, FTP, SMTP, and others.