Some characteristics of the complex TCP protocol

齐天大圣
Release: 2020-12-21 11:33:50
Original
251 people have browsed it

TCP is a very complex protocol. Simply put, it is a connection-oriented, reliable byte stream-based transmission protocol. Some of the main features of the TCP protocol are as follows:

Connection-oriented: Connection-oriented means that a connection needs to be established before data is transmitted. It takes three handshakes to establish a connection and four waves to disconnect. The communication between two hosts is similar to making a phone call. Before the call, you need to dial to establish a connection. After the call, you need to hang up to release the connection.

One-to-one communication: The TCP protocol can only communicate between two hosts, and cannot perform one-to-many or many-to-many communication. For applications that require broadcasting, the TCP protocol is not suitable.

Provide reliable transmission service: Data transmitted through TCP is not lost, not repeated, error-free and can arrive in order. This is the core function of TCP, because we know that the data link layer and IP layer try their best to deliver, but they are not reliable. TCP achieves the function of providing reliable delivery through some protocols.

Support full-duplex communication: Both ends of the TCP connection are cached, allowing data to be sent between the two hosts at any time. When sending data, the application will first send the data to the TCP send buffer, and then it can do other things. Then, the data in the cache will be sent out gradually and in order. When accepting, TCP stores the received data in the acceptance cache, and then can continue to accept other data. The data in the acceptance cache waits for the application to read in turn.

Byte stream oriented: Before explaining byte stream oriented, let’s first talk about UDP being message oriented. Message-oriented means that if the application sends multiple data to UDP, it will put the received data in one UDP, regardless of the size of the data. When UDP transmits data to the application process, it also sends the entire data packet. Then TCP's byte stream-oriented and UDP are definitely different. "Stream" means flowing into or out of the application process. When an application process sends a piece of data to TCP, TCP treats it as a series of unstructured byte streams. Then, when sending, these byte streams may be transmitted through one or more TCP segments.

Some characteristics of the complex TCP protocol

The above is the detailed content of Some characteristics of the complex TCP protocol. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
1
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!