当前位置:网站首页>传输层 以字节为单位的滑动窗口技术
传输层 以字节为单位的滑动窗口技术
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的。
边栏推荐
- linux 系统redis常用命令
- Opengauss kernel: simple query execution
- Overview of medium and low speed aerospace electronic bus
- On the difficulty of developing large im instant messaging system
- Investment analysis and prospect forecast report of global and Chinese propargyl chloride industry from 2022 to 2028
- Difficult and miscellaneous problems: A Study on the phenomenon of text fuzziness caused by transform
- 5年,从“点点点”到现在的测试开发,我的成功值得每一个借鉴。
- Eye gaze estimation using webcam
- Svg+js keyboard control path
- Development status and prospect trend forecast report of humic acid sodium industry in the world and China from 2022 to 2028
猜你喜欢

svg+js键盘控制路径

Color gradient gradient color collection

Im instant messaging development application keeping alive process anti kill
Design and practice of vivo server monitoring architecture

磁带svg动画js特效

im即时通讯开发应用保活之进程防杀

I suddenly find that the request dependent package in NPM has been discarded. What should I do?

Dynamic effect of canvas lines

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
随机推荐
Outer screen and widescreen wasted? Harmonyos folding screen design specification teaches you to use it
MySQL semi sync replication
【排行榜】Carla leaderboard 排行榜 运行与参与手把手教学
[Solved] Public key for mysql-community-xxx. rpm is not installed
Overview of medium and low speed aerospace electronic bus
Why do more and more physical stores use VR panorama? What are the advantages?
Analysis report on operation pattern and supply and demand situation of global and Chinese cyano ketoprofen industry from 2022 to 2028
[interview question] what is a transaction? What are dirty reads, unrepeatable reads, phantom reads, and how to deal with several transaction isolation levels of MySQL
Requests Library
Common redis commands in Linux system
为什么生命科学企业都在陆续上云?
canvas螺旋样式的动画js特效
Current situation analysis and development trend forecast report of global and Chinese acrylonitrile butadiene styrene industry from 2022 to 2028
在滴滴和字节跳动干了 5年软件测试,太真实…
On the difficulty of developing large im instant messaging system
Domain Driven Design and coding
Tongji and Ali won the CVPR best student thesis, lifeifei won the Huang xutao award, and nearly 6000 people attended the offline conference
【Proteus仿真】定时器0作为16位计数器使用示例
C程序设计专题 15-16年期末考试习题解答(上)
Time unified system