当前位置:网站首页>传输层 以字节为单位的滑动窗口技术
传输层 以字节为单位的滑动窗口技术
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的。
边栏推荐
- 使用网络摄像头进行眼睛注视估计
- Approaching harvest moon:moonbeam DFI Carnival
- Investment analysis and prospect forecast report of global and Chinese propargyl chloride industry from 2022 to 2028
- 为什么越来越多的实体商铺用VR全景?优势有哪些?
- MySQL log management
- C程序设计专题 18-19年期末考试习题解答(下)
- im即时通讯开发应用保活之进程防杀
- Investment analysis and prospect forecast report of global and Chinese octadecyl cyclopentanoate industry from 2022 to 2028
- 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
- 为什么生命科学企业都在陆续上云?
猜你喜欢

canvas线条的动态效果

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

为什么越来越多的实体商铺用VR全景?优势有哪些?

JDBC - database connection

人体改造 VS 数字化身

Discrete mathematics and its application detailed explanation of exercises in the final exam of spring and summer semester of 2018-2019 academic year

JDBC —— 数据库连接

canvas螺旋样式的动画js特效

Adding, deleting, modifying and checking in low build code

JPA learning 1 - overview, JPA, JPA core annotations, JPA core objects
随机推荐
UE4 WebBrowser chart cannot display problems
Outer screen and widescreen wasted? Harmonyos folding screen design specification teaches you to use it
ArcGIS loads free online historical images as the base map (no plug-ins are required)
Global and Chinese tetrahydrofurfuryl butyrate industry operation pattern and future prospect report 2022 ~ 2028
Approaching harvest moon:moonbeam DFI Carnival
磁带svg动画js特效
JPA learning 1 - overview, JPA, JPA core annotations, JPA core objects
U.S. House of Representatives: digital dollar will support the U.S. dollar as the global reserve currency
为什么生命科学企业都在陆续上云?
第三代电力电子半导体:SiC MOSFET学习笔记(五)驱动电源调研
DO280OpenShift访问控制--加密和ConfigMap
Domain Driven Design and coding
On the difficulty of developing large im instant messaging system
Discrete mathematics and its application detailed explanation of exercises in the final exam of spring and summer semester of 2018-2019 academic year
Opengauss kernel: simple query execution
为什么越来越多的实体商铺用VR全景?优势有哪些?
Tutorial details | how to edit and set the navigation function in the coolman system?
canvas螺旋样式的动画js特效
Investment analysis and prospect forecast report of global and Chinese triglycine sulfate industry from 2022 to 2028
Leetcode No.10 regular expression matching