当前位置:网站首页>傳輸層 以字節為單比特的滑動窗口技術
傳輸層 以字節為單比特的滑動窗口技術
2022-06-25 00:22: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的。
边栏推荐
- Microsoft won the title of "leader" in the magic quadrant of Gartner industrial Internet of things platform again!
- How to use promise Race() and promise any() ?
- I suddenly find that the request dependent package in NPM has been discarded. What should I do?
- Design scheme of authority management of fusion model
- Report on operation mode and future development trend of global and Chinese propenyl isovalerate industry from 2022 to 2028
- Decoupling pages and components using lifecycle
- 信号完整性(SI)电源完整性(PI)学习笔记(一)信号完整性分析概论
- Why are life science enterprises on the cloud in succession?
- 水库大坝安全监测
- Zed acquisition
猜你喜欢

VNC viewer remote connection raspberry pie without display

Tape SVG animation JS effect
Alternative to log4j

Svg line animation background JS effect

A small program written this week

Collective例子

U.S. House of Representatives: digital dollar will support the U.S. dollar as the global reserve currency
Difficult and miscellaneous problems: A Study on the phenomenon of text fuzziness caused by transform

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

Collective example
随机推荐
[leaderboard] Carla leaderboard leaderboard leaderboard operation and participation in hands-on teaching
Use of JMeter easynmon
为什么生命科学企业都在陆续上云?
Design scheme of authority management of fusion model
Collection of software testing and game testing articles
MySQL semi sync replication
D manual destruction may violate memory security
On the difficulty of developing large im instant messaging system
传输层 以字节为单位的滑动窗口技术
Paper review: U2 net, u-net composed of u-net
信号完整性(SI)电源完整性(PI)学习笔记(二十五)差分对与差分阻抗(五)
Design and practice of vivo server monitoring architecture
Apk slimming compression experience
I suddenly find that the request dependent package in NPM has been discarded. What should I do?
Interesting checkbox counters
Technology sharing | wvp+zlmediakit realizes streaming playback of camera gb28181
Zed acquisition
融合模型权限管理设计方案
Jar package merging using Apache ant
在滴滴和字节跳动干了 5年软件测试,太真实…