当前位置:网站首页>Transport layer uses sliding window to realize flow control
Transport layer uses sliding window to realize flow control
2022-06-30 19:56:00 【Foxconn quality inspector zhangquandan】
Sliding window mechanism
Traffic buffering : Solve the speed mismatch problem ( Client and server , The speeds at these two ends are completely inconsistent , Inconsistent machine performance , At this time, the processing speed is not matched )
TCP Use sliding window to realize flow control . Flow control is to control the sending rate of the sender , To ensure that the receiving party can receive .
TCP Both sides of the session maintain a sending window and a receiving window . The size of the receive window depends on the application 、 System 、 Hardware limitations . The sending window depends on the receiving window of the peer notification .
In the confirmation message sent by the receiver window Field can be used to control the size of the sender's window , Thus, the transmission rate of the sender is affected . Send the receiver's confirmation message window Field set to 0, Then the sender cannot send data .

TCP Header contains window Field ,16bit position , It represents the byte capacity of the window , The maximum is 65535. This field tells the sender how many buffers it has to receive data . So the sender can send data according to the processing power of the receiver , The receiver will not be unable to handle it . The size of the receiving window is approximately equal to the size of the transmitting window .
Flow control means that the sender sends to the receiver too fast , The receiver can tell it to slow down .( Sliding window to achieve flow control , Flow control is that the receiver controls the sender )
Receiving end setting window , The sending end sets the sending window according to the window of the receiving end , The window can be adjusted during the whole communication process .

There are window fields when the above connection is established 64240 Bytes , The largest data segment is 1460, The maximum transmission unit of the network card MTU The largest transmission unit in the data link layer is 1500 Bytes , The first part of the network layer is 20 Bytes , The first part of the transport layer is 20 Bytes , Then the data becomes 1460 Bytes . So slide the window 64240/1460 You can send it continuously 44 A packet .
At the same time, it can also support selective confirmation SACK_PERM=1.
In establishment TCP These parameters can be negotiated when connecting , How big is the receiving window ,MSS How much is the , Then support selective confirmation .
Confirm that the length of the data inside is 0 Of , The window size is specified when the confirmation is given , You can see that the window can be resized . When the receiving window becomes smaller, the sending window becomes smaller , The sender doesn't send it so fast .

b tell a, Its acceptance window is 400, The maximum length of the segment is 100 Bytes , In the hair 1 2 here we are 3 lost , Confirm it , Let it send a third packet , Then the window starts moving , Then send a message 4 5 A second time 3 individual , Confirm to it after receiving ........
The window becomes 0 After that, I stopped sending it , The sender stops , Send confirmation after processing , The window is adjusted to 400.
边栏推荐
- 启动PHP报错ERROR: [pool www] cannot get uid for user ‘@[email protected]’
- 【已解决】抖音如何取消关注已注销的账户
- 条件编译
- Audio and video architecture construction in the super video era | science and Intel jointly launched the second season of "architect growth plan"
- #夏日挑战赛#【FFH】HarmonyOS手机遥控Dayu开发板相机
- Unity 如何拖拉多个组件中的一个
- 计网 | 【五 传输层、六 应用层】知识点及例题
- 线下门店为什么要做新零售?
- 十分之坑,tar命令解压文件的时候竟然不能解析英文括号“()”
- Lombok
猜你喜欢

台湾SSS鑫创SSS1700替代Cmedia CM6533 24bit 96KHZ USB音频编解码芯片

SSM整合流程(整合配置、功能模块开发、接口测试)

计网 | 【五 传输层、六 应用层】知识点及例题

数据智能——DTCC2022!中国数据库技术大会即将开幕

How unity pulls one of multiple components

Friends in Guangzhou can join us if they have the opportunity

WordPress 博客使用火山引擎 veImageX 进行静态资源 CDN 加速(免费)

Why should offline stores do new retail?
![[solved] how does Tiktok cancel paying attention to the cancelled account](/img/1f/7b0bd2c0f69f7f3d1c25c426cc5771.png)
[solved] how does Tiktok cancel paying attention to the cancelled account

The prospectus of pelt medical was "invalid" for the second time in the Hong Kong stock exchange, and the listing plan was substantially delayed
随机推荐
discuz 论坛提速之删除data/log下的xxx.php文件
【论文阅读】Trajectory-guided Control Prediction for End-to-end Autonomous Driving: A Simple yet Strong Baseline
Final chapter of binary tree
操作系统面试题汇总(不定期更新)
C语言:hashTable
请指教在线开户是什么意思?究竟网上开户是否安全么?
Advanced skills of testers: a guide to the application of unit test reports
“更福特、更中国”拨云见日,长安福特王牌产品订单过万
企业中通过组策略管理Edge浏览器设置(IE模式、主页绑定等)
Go language learning tutorial (13)
测试必备工具 —— Postman实战教程
MQ advantages and disadvantages (2022.5.2-5.8)
This morning, investors began to travel collectively
CV+Deep Learning——网络架构Pytorch复现系列——basenets(BackBones)(一)
Is it safe to open an account for mobile phone stock trading!?
WeakSet
Django上传excel表格并将数据写入数据库的详细步骤
Warmup预热学习率「建议收藏」
Redis ziplist 压缩列表的源码解析
MQ selection (2022.5.9-5.15)