当前位置:网站首页>传输层 以字节为单位的滑动窗口技术
传输层 以字节为单位的滑动窗口技术
2022-06-24 19:50:00 【富士康质检员张全蛋】
前面的可靠传输的工作原理,比较概括一些,比如停止等待协议,连续ARQ和滑动窗口,以字节为单位的滑动窗口技术其实就是详细的说连续ARQ和滑动窗口是怎么实现的。
应用程序要将文件传输给另外一个计算机,其实这个文件是以字节流的方式往缓存里面放,在缓存里面将字节分段,
分段,每个序号为分段中的第一个。
滑动窗口技术详解
a和b计算机通信的时候要建立连接,b计算机告诉a计算机这边的接受窗口是400个字节,最大支持的报文段mss是100个字节,这是b计算机告诉a计算机的,400个字节就是接受窗口。
这个时候a在缓存里面设置一个发送窗口,这个窗口是400个字节,然后将里面传输的内容以字节流的方式以100个字节分组,并且编号。
这个时候会有4个分组在这个滑动窗口里面,这个时候就可以发1,2,3,4个分组,这个就是连续ARQ,第一个序号是1,第二个序号是101..........。
b收到之后,应用程序就从缓存里面读取这些连续收到的,这个时候接受窗口开始移动,相当于腾出空间了,收到之前4个数据段给a发送一个确认,确认号ack的标记位ACK=1,确认号是401,这就意味着前面400个字节全部收到了,你该给我发401个字节了,这个时候发送窗口也开始移动,然后后面的数据段跑到滑动窗口里面来了,又重复上面步骤。
收到确认之后,已发送的那些数据段就可以在缓存里面删除了。
在发送的时候,第7个假如丢了,接收端收到了5,6,8,这个时候收到之后由于7没有收到,窗口就不能向前移动了,这个时候会向a发出确认,该给我发601了,在之前的我都收到,接收端开始滑动窗口,那么9,10都进了滑动窗口,然后发送9,10。
7丢了,啥时候发呢?每次发送一个分组都有一个计时,在等了一个往返时间,超时之后自动重发。收到确认之后,并不是立刻发丢了的7,而是先窗口移动,落到窗口的9和10发。(因为支持选择性确认,那么8就不会重新发了)
7 8 9 10都收到了,就开始读这些连续的数据,读到连续的字节再给它确认发1001.
上面就是以字节为单位的滑动窗口技术。
这个滑动窗口大小是b计算机告诉a的。
边栏推荐
- UE4 WebBrowser图表不能显示问题
- Tongji and Ali won the CVPR best student thesis, lifeifei won the Huang xutao award, and nearly 6000 people attended the offline conference
- How does VR panorama make money? Based on the objective analysis of the market from two aspects
- 使用网络摄像头进行眼睛注视估计
- Tape SVG animation JS effect
- Ansible及playbook的相关操作
- Current situation analysis and development trend forecast report of global and Chinese acrylonitrile butadiene styrene industry from 2022 to 2028
- Signal integrity (SI) power integrity (PI) learning notes (I) introduction to signal integrity analysis
- Power application of 5g DTU wireless communication module
- Overview of medium and low speed aerospace electronic bus
猜你喜欢
JPA learning 1 - overview, JPA, JPA core annotations, JPA core objects
[leaderboard] Carla leaderboard leaderboard leaderboard operation and participation in hands-on teaching
JDBC —— 数据库连接
ArcGIS加载免费在线历史影像作为底图(不需要插件)
Hyperledger Fabric 2. X dynamic update smart contract
Meta&伯克利基于池化自注意力机制提出通用多尺度视觉Transformer,在ImageNet分类准确率达88.8%!开源...
为什么越来越多的实体商铺用VR全景?优势有哪些?
节奏快?压力大?VR全景客栈带你体验安逸生活
VR全景制作的优势是什么?为什么能得到青睐?
教程详解|在酷雷曼系统中如何编辑设置导览功能?
随机推荐
Analysis report on development trend and investment forecast of global and Chinese D-leucine industry from 2022 to 2028
5-minute NLP: summary of 3 pre training libraries for rapid realization of NER
Investment analysis and prospect forecast report of global and Chinese octadecyl cyclopentanoate industry from 2022 to 2028
How can I persuade leaders to use DDD to construct the liver project?
Phprunner 10.7.0 PHP code generator
有趣的checkbox计数器
Ansible及playbook的相关操作
What are the advantages of VR panoramic production? Why is it favored?
C WinForm maximizes occlusion of the taskbar and full screen display
Current situation and development prospect forecast report of global and Chinese tetrahydrofurfuryl alcohol acetate industry from 2022 to 2028
MySQL日志管理
Approaching harvest moon:moonbeam DFI Carnival
Domain Driven Design and coding
[interview question] the difference between instancof and getclass()
Analysis report on the development trend and Prospect of cetamide industry in the world and China from 2022 to 2028
Hibernate learning 3 - custom SQL
【面试题】什么是事务,什么是脏读、不可重复读、幻读,以及MySQL的几种事务隔离级别的应对方法
Paper review: U2 net, u-net composed of u-net
The new employee of the Department after 00 is really a champion. He has worked for less than two years. The starting salary of 18K is close to me when he changes to our company
Tutorial details | how to edit and set the navigation function in the coolman system?