当前位置:网站首页>Tcp- simple understanding of three handshakes and four waves
Tcp- simple understanding of three handshakes and four waves
2022-07-04 04:20:00 【I'm not Xiao Haiwa~~~~】
Three handshakes (three-way handshaking)
1. background :TCP On the transport layer , The function is to provide reliable byte stream service , In order to accurately deliver the data to the destination ,TCP The protocol adopts the strategy of three handshakes .
2. principle :
1) The sender first sends a message with SYN(synchronize) Flag packet to receiver .
2) After receiving , Send back one with SYN/ACK The packet of the flag passes the confirmation message , Means I received .
3) Last , The sender sends back another one with ACK Packets for flags , On behalf of me , Express ’ handshake ‘ end .
In popular parlance
1)Client: well , Li Si , Is my , Do you hear me ?
2)Server: I heard , Can you hear me ?
3)Client: well , We can all hear each other , Our correspondence can begin .
Four waves (Four-Way-Wavehand)
1. significance : When the passive party receives the FIN Message notification , It just means that the active party has no data to send to the passive party . But not all the data of the passive party is completely sent to the active party , So the passive side won't shut down immediately SOCKET, It may also need to send some data to the active party , Send again FIN Message to the active party , Tell the active party to agree to close the connection , So here ACK Message and FIN In most cases, messages are sent separately .
2. principle :
1) First wave :Client Send a FIN, Used to close Client To Server Data transfer of ,Client Get into FIN_WAIT_1 state .
2) Second wave :Server received FIN after , Send a ACK to Client, Confirmation No. is receipt No +1( And SYN identical , One FIN Occupy a sequence number ),Server Get into CLOSE_WAIT state .
3) Third wave :Server Send a FIN, Used to close Server To Client Data transfer of ,Server Get into LAST_ACK state .
4) Fourth wave :Client received FIN after ,Client Get into TIME_WAIT state , And then send a ACK to Server, Confirmation No. is receipt No +1,Server Get into CLOSED state , Finish four waves
In popular parlance
1)Client: I'm done with everything
2)Server: I've heard all about , But wait for me , I haven't finished
3)Server: Okay , I have finished
4)Client: well , Then our correspondence is over l
link :https://www.jianshu.com/p/d3725391af59
边栏推荐
- VIM add interval annotation correctly
- 函数计算异步任务能力介绍 - 任务触发去重
- 01 qemu 启动编译好的镜像 VFS: Unable to mount root fs on unknown-block(0,0)
- [book club issue 13] multimedia processing tool ffmpeg tool set
- 分布式系统:what、why、how
- DP83848+网线热拔插
- CesiumJS 2022^ 源码解读[0] - 文章目录与源码工程结构
- PostgreSQL users cannot create table configurations by themselves
- JDBC 进阶
- PPt 教程,如何在 PowerPoint 中将演示文稿另存为 PDF 文件?
猜你喜欢

Katalon中控件的参数化

三菱M70宏变量读取三菱M80公共变量采集三菱CNC变量读取采集三菱CNC远程刀补三菱机床在线刀补三菱数控在线测量

I Build a simple microservice project

Flink learning 8: data consistency

PostgreSQL users cannot create table configurations by themselves

leetcode刷题:二叉树04(二叉树的层序遍历)

深度优先搜索简要讲解(附带基础题)

Getting started with the go language is simple: go implements the Caesar password

96% of the collected traffic is prevented by bubble mart of cloud hosting

Idea configuration 360zip open by default -- external tools
随机推荐
毕业总结
leetcode刷题:二叉树07(二叉树的最大深度)
Mitsubishi M70 macro variable reading Mitsubishi M80 public variable acquisition Mitsubishi CNC variable reading acquisition Mitsubishi CNC remote tool compensation Mitsubishi machine tool online tool
Flink学习6:编程模型
PostgreSQL users cannot create table configurations by themselves
2022-07-03: there are 0 and 1 in the array. Be sure to flip an interval. Flip: 0 becomes 1, 1 becomes 0. What is the maximum number of 1 after turning? From little red book. 3.13 written examination.
postgresql 用户不能自己创建表格配置
The three-year revenue is 3.531 billion, and this Jiangxi old watch is going to IPO
leetcode刷题:二叉树04(二叉树的层序遍历)
【读书会第十三期】视频文件的封装格式
'2'>' 10'==true? How does JS perform implicit type conversion?
Graduation summary
[csrf-01] basic principle and attack and defense of Cross Site Request Forgery vulnerability
laravel admin里百度编辑器自定义路径和文件名
DP83848+网线热拔插
【CSRF-01】跨站请求伪造漏洞基础原理及攻防
还原窗口位置的微妙之处
2020 Bioinformatics | TransformerCPI
[paddleseg source code reading] normalize operation of paddleseg transform
Katalon framework test web (XXVI) automatic email