当前位置:网站首页>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.
边栏推荐
- 解决arm_release_ver of this libmali is ‘g2p0-01eac0‘,rk_so_ver is ‘4‘,libgl1-mesa-dev不会被安装,存在未满足的依赖关系
- 昔日果汁大王,16个亿卖了
- 实现各种效果和功能的按钮,读这篇文章就够了
- 企业中通过组策略管理Edge浏览器设置(IE模式、主页绑定等)
- MySQL billing Statistics (Part 1): MySQL installation and client dbeaver connection
- 【450. 删除二叉搜索树中的节点】
- VoIP Push 在海外音视频业务中的应用
- QQmlApplicationEngine failed to load component qrc:/main.qml:-1 No such file or directory
- 毕业季职场人
- qt中toLocal8Bit和toUtf8()有什么区别
猜你喜欢

为什么一定要从DevOps走向BizDevOps?

为什么数字化转型战略必须包括持续测试?

RP原型资源分享-购物类App

图扑软件通过 CMMI5 级认证!| 国际软件领域高权威高等级认证

This morning, investors began to travel collectively

更智能!AIRIOT加速煤炭行业节能减排升级

CV+Deep Learning——网络架构Pytorch复现系列——basenets(BackBones)(一)

Conditional compilation

The prospectus of pelt medical was "invalid" for the second time in the Hong Kong stock exchange, and the listing plan was substantially delayed

《微信小程序-基础篇》带你了解小程序中的生命周期(二)
随机推荐
计网 | 【五 传输层、六 应用层】知识点及例题
太湖 “中国健康农产品·手机直播万里行”走进太湖
更智能!AIRIOT加速煤炭行业节能减排升级
Enterprise middle office planning and it architecture microservice transformation
WeakSet
超视频时代的音视频架构建设|Science和英特尔联袂推出“架构师成长计划”第二季
如何做好测试用例设计
A detailed explanation of the implementation principle of go Distributed Link Tracking
昔日果汁大王,16个亿卖了
composer
哪个券商佣金的佣金最低?另外,手机开户安全么?
内存数据库如何发挥内存优势?
4.3-inch touch screen 12 channel control port programmable network central control supports mutual backup of 5 central control hosts
Ten percent of the time, the tar command can't parse the English bracket "()" when decompressing the file
小学期,第三场-下午:WEB_xxe
线下门店为什么要做新零售?
c语言数组截取,C# 字符串按数组截取方法(C/S)
QT :QAxObject操作Excel
CV+Deep Learning——网络架构Pytorch复现系列——basenets(BackBones)(一)
arthas调试 确定问题工具包