当前位置:网站首页>Interview shock: why does TCP need three handshakes?
Interview shock: why does TCP need three handshakes?
2022-07-25 18:26:00 【51CTO】
TCP Three handshakes is a classic interview question , It means TCP Before transferring data , Need to carry out 3 The connection can only be formally established after several interactions , And data transmission .TCP The reason why we need 3 This handshake is because TCP Both sides are full duplex . Full duplex refers to ,TCP Either end is the sender , It is also the receiving party , So this requires TCP Both sides of communication should ensure their sending ability , You have to ensure your receiving ability . It's like making a phone call , Both communication parties should ensure that they can use the microphone ( Transmit sound ) And headset ( Receiving sound ) It's all normal , Only in this way can we communicate effectively , Usually on the phone , It all starts like this :
- I : feed , Can you hear me ?
- other party : I can hear you , Can you hear me ?
- I : I can hear you , Let's talk about business .
TCP Three handshakes are the same ,3 Details of the ability to prove this handshake are as follows :

TCP Three handshake process
TCP The three handshakes are as follows :
- The client sends SYN To the server , Indicates that you want to establish a connection ;
- After the server receives the message , In response to a SYN and ACK( Confirm response ) To the client ;
- The client receives... From the server SYN After the message , In response to a ACK message .
The specific implementation process is shown in the figure below :

summary
TCP The reason why we need 3 The second handshake , Because TCP Both sides of the communication are full duplex , So we have to go through 3 The sending and receiving capabilities of both parties can only be confirmed after several interactions , also TCP Handshake must be 3 Time , If it is 2 The second handshake , It cannot prove the sending ability of the server and the receiving ability of the client ; Nor is 4 The second handshake , because 3 Things that can be proved once , Then shake hands with each other 1 This time is completely unnecessary .
边栏推荐
- 1---电子实物认知
- Safe operation instructions for oscilloscope probe that must be read by engineers
- "Deprecated gradle features were used in this build, making it incompatible with gradle 6.0" problem solving
- SQL things
- STM8S003F3 内部flash调试
- SQL那些事
- Talking about Devops monitoring, how does the team choose monitoring tools?
- 乐观锁解析
- 浅析回归问题、建模、预测
- Oracle uses impdp import to report an error: ora-39001: invalid parameter value ora-39000: dump file description error ora-39088: file name cannot contain path description
猜你喜欢

Number two 2010 real test site

Related operations of binary tree

Tkinter GUI address book management system

LeetCode 101. 对称二叉树 && 100. 相同的树 && 572. 另一棵树的子树

【华为机试真题】字符串匹配

Express of nodejs simple example program

nodejs 简单例子程序之express
![Why is the index in [mysql] database implemented by b+ tree? Is hash table / red black tree /b tree feasible?](/img/1f/a2d50ec6bc97d52c1e7566a42e564b.png)
Why is the index in [mysql] database implemented by b+ tree? Is hash table / red black tree /b tree feasible?

Cve-2022-33891 Apache spark shell command injection vulnerability recurrence

SQL那些事
随机推荐
The milestone progress has been made in the joint development of whole human GPCR antibody drugs by baicalto and liberothera
1---电子实物认知
文件基础知识
One week activity express | in simple terms, issue 8; Meetup Chengdu station registration in progress
[QNX hypervisor 2.2 user manual]9.4 dryrun
【华为机试真题】字符串匹配
使用sqldeveloper连接mysql
Talking about Devops monitoring, how does the team choose monitoring tools?
The use of invocationcount, threadpoolsize, timeout of concurrent tests in TestNG
Today's sleep quality record is 84 points
Three control methods of TestNG execution sequence
程序的编译
c语言---25 扫雷游戏
Analysis of regression problem, modeling and prediction
STM32F105RBT6 内部flash调试
Tensor to img & imge to tensor (tensor conversion of pytorch)
408 Chapter 2 linear table
Recognized by international authorities! Oceanbase was selected into the Forrester translational data platform report
Sequential storage structure, chain storage structure and implementation of stack
如何将exe文件添加到开机启动