当前位置:网站首页>傳輸層 以字節為單比特的滑動窗口技術
傳輸層 以字節為單比特的滑動窗口技術
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的。
边栏推荐
- [Solved] Public key for mysql-community-xxx. rpm is not installed
- D manual destruction may violate memory security
- Svg line animation background JS effect
- 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
- Fast pace? high pressure? VR panoramic Inn brings you a comfortable life
- Color gradient gradient color collection
- Usage of ViewModel and livedata in jetpack
- Eye gaze estimation using webcam
- VNC viewer remote connection raspberry pie without display
- UE4 WebBrowser图表不能显示问题
猜你喜欢

微搭低代码中实现增删改查

Power application of 5g DTU wireless communication module

UE4 WebBrowser图表不能显示问题

The third generation of power electronics semiconductors: SiC MOSFET learning notes (V) research on driving power supply

svg+js键盘控制路径

Im instant messaging development application keeping alive process anti kill

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

What are the advantages of VR panoramic production? Why is it favored?

Zed acquisition

Human body transformation vs digital Avatar
随机推荐
Meta & Berkeley proposed a universal multi-scale visual transformer based on pooled self attention mechanism. The classification accuracy in Imagenet reached 88.8%! Open source
Adding, deleting, modifying and checking in low build code
Ten commandments of self-learning in machine learning
im即时通讯开发应用保活之进程防杀
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
A small program written this week
Use of JMeter easynmon
5-minute NLP: summary of 3 pre training libraries for rapid realization of NER
颜色渐变梯度颜色集合
Why do more and more physical stores use VR panorama? What are the advantages?
Hibernate learning 3 - custom SQL
Scrollview height cannot fill full screen
MySQL semi sync replication
[issue 25] face to face experience of golang Engineer in the rightmost social recruitment
[interview question] the difference between instancof and getclass()
Use and click of multitypeadapter in recycleview
Ott marketing is booming. How should businesses invest?
【面试题】什么是事务,什么是脏读、不可重复读、幻读,以及MySQL的几种事务隔离级别的应对方法
[proteus simulation] example of using timer 0 as a 16 bit counter
Use of JMeter