Establish a connection
In TCP/IP, TCP provides reliable connection services and uses three handshakes to establish a connection.First handshake: when a connection is established, the client sends
SYN Packet (SYN = J)
Go to the server and enter the syn_send status. wait for confirmation from the server;
The second handshake: the server receives the SYN Packet and must confirm the customer's Syn (ACK =
The three-time handshake process is as follows:
To build a network environment:
Use Commview to grab the package (because it can catch the loop back to the package), open it, and capture 8888-port packets.
The server-side program is:
#include
Start the server, there is no package at this time.
The client program is:
#include Open the client, at this point observation commview, there are three packets, this is the TCP established three times
Turn from: http://apps.hi.baidu.com/share/detail/42639337
TCP Message Segment Header format:
Ordinal number: The ordinal number of the first byte of the data sent by this paragraph.
Acknowledgment number ack: expecting to receive the number of the first data byte of the next message segment
Confirm ack: 1 digits, the confirmation Number field is valid only when ack=1. Ack=0, the confirmation number is invalid
Synchronous syn: Used to synchronize serial numbers when the connection is established
SEO optimization is mainly to make their own site ranking beyond their competitors, but a lot of people do not realize this core point, just blindly to do outside the chain, to update the site, but the time is not obvious effect, this is behind closed doors, if we can carefully analyze the top of the site, analysis of their website , find the clues to their SEO optimization, you will be able to find a way to defeat
1. Establish a connection protocol (three-way handshake)
(1) the client sends a TCP packet with SYN flag to the server. This is packet 1 during the three-way handshake.
(2) The server responds to the client. This is the first packet in the three-way handshake. This packet carries both the ACK mark and SYN sign. Therefore, it indicates the response to the client S
TCP three-way handshake and TCP three-way handshakeFirst handshake
The client calls connect to send a connection request message to the server. The packet is a special packet. The first synchronization bit SYN = 1, and the confirmation bit ACK = 0, seq = x indicates that the value of the validation field is x. The value of this field is selected by the client, the first byte Number of the data sent from th
I. Details about TCP three-way handshake
In TCP/IP, TCP provides reliable connection services and uses three-way handshakes to establish a connection.
1. When a connection is established, the client sends a SYN packet to the server and enters the syn_send status. In this status, the client waits for the confirmation packet from the server.
2. After the server receives the SYN packet from the client, it first confirms to the client that it has received
, PSH = 1;
Reset RST. When rst = 1, it indicates a serious error occurred in the TCP connection. You must release the connection and then re-establish the connection;
Synchronize SYN, which is used to synchronize sequence numbers when a connection is established. When SYN = 1, ACK = 0, it indicates a connection request message. If you agree to the connection, the response message should make SYN = 1, ACK = 1;
Terminate fin to release the connection. When fin = 1, it indicates that the data of
TCP/IP status change diagram and TCP three-way handshake and four-way handshake (1)
TCP/IP status change diagram:
Detailed descriptions of each status:
CLOSED: indicates the initial state. It is the same for both the server and the C client.
LISTEN: indicates the listening status. The server calls the listen function to start the accept connection.
SYN_SENT: indicates that the client has sent the SYN pack
TCP three-way handshake1. When a connection is established, the client sends a SYN packet to the server and generates an sequential number seq number = K, waiting for the server to confirm.2. After the server receives a request, confirm the online information, send the confirmation code ACK = k + 1, Syn packet to the client, and generate an sequence number seq number = Q.3. Check whether the Ack is correct after the client receives the confirmation information. If yes, send the confirmation code
The reasons are explained in the computer network (Shehiren translation):
1. Two handshake, then if the client to the server-initiated package A1 if the fault in the transmission link, resulting in the transfer to the server time is rather lag, in this time period because the client did not receive the server for the package A1 confirmation, then will retransmit a packet A2, Assume that the server received the A2 package normally, and then return to c
Analysis on how to help your SEO by analyzing your competitors
Competition among search engine organic search results is like competition for real estate in a favorable area. Because a good ranking in search engines means a good traffic, which means more traffic, more conversion, and more sales. High Ranking is not an easy task, especially for a highly competitive industry. Even if you hire the best seoer and have the best SEO strategy, you cannot al
Original address
As a qualified seoer, the analysis of the competitor website must be mastered, reasonable analysis of the weak part of the competitor SEO optimization and advantages, and then according to our own web site to develop corresponding optimization strategy to enhance the site keyword rankings. But there are still a lot of friends for the analysis of competitors do not have clear ideas, the following rhino cloud for everyone to comb unde
To optimize the success of SEO, analysis of competitors is an essential link, do not bother, it can let you optimize the optimization of SEO. As the saying goes, there are mountains outside the mountains, there are people outside. Not every seoer is the so-called master, each seoer has its own shortcomings, but also should learn from the strengths of others. And we received a new list of SEO, we can not ignore the strength of
It takes three handshake to establish TCP and four handshake to disconnect. The entire process is shown in the following illustration:
Let's take a look at how to establish a connection.
First, the client side sends the connection request message, the server segment accepts the connection and replies the ACK message, and allocates resources for this connection. The client side receives the ACK message and
When learning the network basics, the transport layer protocols include TCP and UDP;
In Linux network programming, we use the socket API to implement network communication.
So:
How does the status of Socket API correspond to that of TCP? We can see through:
How to complete three handshakes and four waves in Socket System calls:
Sock_dgram, that is, the connect operation knowledge in UDP registers the IP address and port information of the other machine in the kernel, and does not establish a l
The boss went out to recruit people and threw a document before leaving: project implementation 9 Yin Zhenjing, surpassing competitors-18 Practical Skills of software project managers
The document does not contain the author's name, and I have not checked the source.
Let's see it first.
Here we will record the good sentences and personal insights in the document.
This includes the author's and my thoughts.
Comments as you like
------------------
These days have a lot of friends asked the new Chen, why the site ranking dropped? Why are they being attacked by others? Of course, this is undoubtedly related to the content of your site, the external chain and the user experience has a very big relationship, just. New Chen in this feel, also need to study the competitor's site, to do: no one I have. People have my gifted, just have this, talent will your site really do up; so compare your competitors
is written there is the keyword, whether it is the home page, and then preliminary analysis of the top ranked Baidu competition site strength and so on. The results of these analyses are then recorded with detailed data.
Select the criteria for the keyword is clear: in your list of keywords, through the analysis of data comparison keyword heat and competition, in principle, the selection of large, competitive keywords as our site's core keywords. We all know that the core keyword selection of
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.