What is a port

Source: Internet
Author: User
Tags port number

Sometimes an IP address is not sufficient to identify a server completely. This is because in a physical machine, often running multiple servers (programs). Each machine expressed by IP also contains the port. When we set up a client or server, we must select a port that either the client or the server approves the connection. Just like when we visit someone, the IP address is the house he lives in, and the port is the room where he is.

Note that the port is not a physical place on the machine, but a software abstraction (mainly for the convenience of presentation). The client knows how to connect to it through the machine's IP address, but how can it connect to the service that it really needs (typically each port runs a service, a machine may provide a variety of services, such as HTTP and FTP, etc.)? The port number plays an important role here, and it is a required two-level addressable approach. In other words, we request a specific port, which is equivalent to requesting the service associated with that port number. "Timekeeping" is a typical example of service. Typically, each service is associated with a unique port number on the same particular server machine. The client program must know in advance the running port number of the service that it requires.

The system service retains the power to use port 1 through port 1024, so you should not allow the services you design to consume these and any other known ports that are already in use. The first example of this book will use port 8080 (The vintage 8-bit Intel 8080 chip used to recall my first machine, which is a computer using the cp/m operating system).

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.