Junior — Middle
Can you explain what the TCP protocol is and its main role in network interaction?
sobes.tech AI
Answer from AI
TCP (Transmission Control Protocol) is one of the main transport layer protocols in the OSI and Internet models. Its primary role is to provide reliable, ordered, and error-free data transfer between two nodes in a network.
TCP establishes a connection between the sender and receiver (the so-called "handshake"), controls packet delivery, retransmits lost data, and guarantees that data will be received in the same order it was sent. This makes TCP ideal for applications where data integrity and sequence are important, such as web servers, email, and file sharing.
Example: When loading a web page via HTTP (which operates over TCP), data is transmitted reliably, and you receive complete and correct content.