The tcp port number is to identify the application process. The transmission user corresponding to the transport layer is an application process; usually, the transport layer corresponds to multiple application processes, that is, multiple processes run in parallel on a host, such as in a multi-tasking or multi-user multi-tasking system. The "port number" provided by TCP is to distinguish these processes.
The operating environment of this tutorial: Windows 7 system, Dell G3 computer.
TCP (Transmission Control Protocol) and UDP (User Datagram Protocol) protocols are transport layer protocols.
TCP provides reliable data transmission in the IP environment. The services it provides include data streaming, reliability, effective flow control, full-duplex operation and multiplexing. Delivered via connection-oriented, end-to-end and reliable packets. In layman's terms, it opens up a connected channel for the data to be sent in advance, and then sends the data;
UDP does not provide reliability, flow control or error recovery for IP Function. Generally speaking, TCP corresponds to applications with high reliability requirements, while UDP corresponds to applications with low reliability requirements and economical transmission.
TCP and UDP provide a "port number", whose function is to identify a specific application entity (application process).
The transmission user corresponding to the transport layer is the application process, or application entity.
Usually, the transport layer will correspond to multiple application processes, that is, there are multiple processes running in parallel on a host, such as in a multi-tasking or multi-user multi-tasking system. TCP and UDP provide "port numbers" to distinguish these processes. Both TCP and UDP reserve some important port numbers, such as the port number of HTTP in TCP is 80, the port number of FTP is 21, etc.
Extended information:
The so-called port is like a house number. The client can find the corresponding server through the IP address, but there are many servers For ports, each application corresponds to a port number. Only through a port number similar to a house number can the client truly access the server. In order to distinguish the ports, each port is numbered, which is the port number.
The main function of the port number is to represent the services provided by a specific process in a computer. Computers in the network represent their identities through IP addresses. It can only represent a specific computer, but one computer can provide many services at the same time, such as database services, FTP services, Web services, etc. We use The port number is used to distinguish these different services provided by the same computer. For example, the common port number 21 represents the FTP service, the port number 23 represents the Telnet service, and the port number 25 refers to the SMTP service. Port numbers are generally used as 4-digit integers. Port numbers cannot be repeated on the same computer. Otherwise, exceptions such as port number conflicts will occur.
Related recommendations: "Programming Learning"
The above is the detailed content of What does the tcp port number indicate?. For more information, please follow other related articles on the PHP Chinese website!