当前位置:网站首页>Why does TCP protocol shake hands three times instead of two?
Why does TCP protocol shake hands three times instead of two?
2022-06-23 06:58:00 【Shu Yang】

Now suppose A And B In communication .
《 computer network 》 The textbook says so :
If this happens now :A The first connection request message sent , But this connection request message has been stuck in the network for a long time , The delay is long until the connection is released B. This was originally a message that had long failed , but B I don't know ,B I mistakenly thought A Another connection request was made , So I happily went to A A confirmation message was replied , Agree to establish a connection .
The problem arises , If we now use two handshakes , So the above situation ,B The connection has been established after the reply . and A It doesn't have to be the same B Establishing a connection , Of course, they will not pay attention to B Confirmation message sent , Not to mention B send data .B I don't know these ,B Think the connection has been established , Waiting in silence A Send data , This is a waste B Resources for .
So a third handshake is necessary .
Other answers that are easy to understand :
After the first handshake ,B got it —— I can receive A Message sent ( I can take it ).
After the second handshake ,A got it —— I sent messages from the past B To receive , And I can also receive B Message sent ( I can send and receive ).
After the third handshake ,B got it —— I sent it to A The news of A To receive ( I can send ).
After three handshakes , Communication forms a closed loop , Both sides know that they can send and receive , It's ready to transfer data .
If there is no third handshake ,B In fact, I don't know whether I can successfully send messages , because A I didn't reply to the message I sent , You may not be able to send messages successfully , So this third handshake is needed .
边栏推荐
- MySQL optimization
- MySQL Redo log Redo log
- 项目_过滤器Filter解决中文乱码
- 解决挖矿病毒 sshd2(redis未设密码、清除crontab定时任务)
- Badly placed()'s problem
- 总结的好处
- Problem: when the attribute in the data object (defined data) in the access component is also the attribute in the object object, an error is reported
- How to view native IP
- 【项目实训10】箭头的绘制
- 二叉树的遍历及相关知识
猜你喜欢

Easy EDA learning notes 09 esp32-wroom-32e module esp32-devkitc-v4 development board one click download circuit
![[project training] multi segment line expanded to parallel line](/img/f2/ee4985fd2454bf00d600e34a818f2d.png)
[project training] multi segment line expanded to parallel line

【STL】关联容器之unordered_map用法总结

Data indicators and data analysis models that designers need to understand

Miscellaneous things
![[project training] change of linear arrow](/img/a4/7554522c13684d7590d247f28a6965.png)
[project training] change of linear arrow

redux Actions may not have an undefined “type“ property. Have you misspelled a constant?

Idea automatically generates serialVersionUID

MySQL redo log redo log

Business logic design of physical warehouse and virtual warehouse in middle inventory
随机推荐
Leetcode notes: Weekly contest 298
Sword finger offer 42 Maximum sum of successive subarrays
Centos7 MySQL records
994. 腐烂的橘子-非递归法
【STL】关联容器之map用法总结
C语言学习总结
cmder
【STL】顺序容器之deque用法总结
20220620 uniformly completely observable (UCO)
MySQL function
【项目实训】线形箭头的变化
解决挖矿病毒 sshd2(redis未设密码、清除crontab定时任务)
Idea installing the cloudtoolkit plug-in
Haas506 2.0 development tutorial - Advanced Component Library -modem SMS (only supports versions above 2.2)
Linux安装mysql8.0.25
页面嵌入iframe 点击浏览器后退问题
使用ts-node直接运行TypeScript代码
Measurement principle and thickness measurement mode of spectral confocal
Detailed explanation of callback function
MySQL optimization