High-level overview of transmission control protocol
TCP meansTransmission Control Protocol, It is the foundation of the Web and other applications (such as email).
Defined inRFC 793In 1981, TCP was one of the oldest pillars of the Internet.
TCP sits on top of the Internet Protocol (IP) and builds a basic system based on application-level protocols such as HTTP, FTP, IMAP, and many other protocols.
Contrary to IP and UDP, TCP isConnection-oriented.
A connection must be established before transmission can be carried out via TCP. The data is sent in small packets, and when the communication ends, the connection is closed.
When data is transmitted via TCP, a relatively complicated work process called a handshake must be carried out.
I won't go into details here, but this kind of handshake can achieve end-to-end connections, and can ensure that TCP can provide one of its unique features: reliability. Using TCP, we can always know whether the data packet sent by the sender is correctly received by the receiver.
If a data packet is lost, the protocol can process it and then resend the data packet.
On the IP protocol, a connection is established between computers. In TCP, the following concepts are used to connect between processesport.
The port associated with the IP address can uniquely identify the process on the computer. like this:
Each application protocol has a default port. For example, HTTP has 80, HTTPS has 443, and FTP has 21. This is why you usually don't have to specify the port in your browser.
There is no need to use default programs, which is why, especially on your local computer, you may see ports such as 1313 or 8080 when you start a new application.
The port number ranges from 1 to 65535 (the port number is 16-bit unsigned, corresponding to 2^16 possible values).
More web tutorials:
- Introduction to WebSockets
- How HTTP requests work
- List of HTTP request headers
- List of HTTP response headers
- HTTP and HTTPS
- What is RFC?
- HTTP protocol
- HTTPS protocol
- The curl guide for HTTP requests
- HTTP cache
- List of HTTP status codes
- What is CDN?
- HTTP/2 protocol
- What is the port
- DNS, Domain Name System
- TCP protocol
- UDP protocol
- Introduction to REST API
- How to install a local SSL certificate in macOS
- How to generate a local SSL certificate
- How to configure Nginx for HTTPS
- A simple Nginx reverse proxy for serving multiple Node.js applications from subfolders
- What is a reverse proxy?