-
用C语言实现的GBN协议函数库和测试程序
滑动窗口协议,也称为回退N步协议(Go-Back-N,GBN)中,允许发送方发送多个分组(当有多个分组可用时)而不需等待确认,但它受限于在流水线
中为未确认的分组数不能超过某个最大允许数N。滑动窗口协议是TCP使用的一种流量控制方法,此协议能够加速数据的传输。
只有在接收窗口向前滑动时(与此同时也发送了确认),发送窗口才有可能向前滑动。
收发两端的窗口按照以上规律不断地向前滑动,因此这种协议又称为滑动窗口协议。
当发送窗口和接收窗口的大小都等于1时,就是停止等待协议。
当发送窗口大于1,接收窗口等于1时,就是回退N步协议。
当发送窗口和接收窗口的大小均大于1时,就是选择重发协议。
协议中规定,对于窗口内未经确认的分组需要重传。这种分组的数量最多可以等于发送窗口的大小,即滑动窗口的大小n减去1(因为发送窗口不可能大于(n-1),起码接收窗口要大于等于1)。
2.工作原理
- 2023-04-29 17:45:03下载
- 积分:1
-
链表的快速排序法
链表的快速排序法-List`s quick sort
- 2022-03-07 17:41:24下载
- 积分:1
-
贝塞尔曲线示例
#include < iostream >
#include < 矢量 >
#include < math.h >
#include"BezierPoint.h"
使用命名空间 std ;
BezierPoint 贝塞尔 (方法 < BezierPoint > & pts,双 t) ;
双选择 (双 a,双 b) ;
双 factorial(double num) ;
int main(void) {
方法 < < BezierPoint >> 方法警校 ;
char endPointCount = 0;
双 inx ;
双 iny ;
int ptCount = 0;
int 终结点 ;
双 deltaT ;
cin >> ptCount >> deltaT ;
为 (int 我 = 0 ; 我 < ptCount; i + +) {
cin >> inx >> iny >> 终结点 ;
BezierPoint p iny inx) ;
如果 (endPointCount = = 0 & & 终结点 = = 1) {
pts.push_back (方法 < BezierPoint > ()) ;
pts[pts.size()-1].push_back(p) ;
endPointCount + +;
继续 ;
}
pts[pts.size()-1].push_back(p) ;
如果 (endPointCount! = 0 & & 终结点 = = 1 & & 我! = ptCount-1) {
pts.push_back (方法 < BezierPoint > ()) ;
pts[pts.size()-1].push_back(p) ;
endPointCount + +;
}
}
为 (std::s
- 2022-03-13 19:08:01下载
- 积分:1
-
马踏棋盘问题:国际象棋中的马,怎样才能不重复的跳遍棋盘上的每一格呢? 笔者见过许多解决这类问题的程序,这个是最简洁同时也是速度最快的一个。...
马踏棋盘问题:国际象棋中的马,怎样才能不重复的跳遍棋盘上的每一格呢? 笔者见过许多解决这类问题的程序,这个是最简洁同时也是速度最快的一个。-horse riding chessboard : the international chess Ma, how can we not repeat the jump all over the chessboard of each? I met many issues to resolve such procedures, this is the most succinct is also the fastest one.
- 2022-07-09 19:26:02下载
- 积分:1
-
Three
三维框架梁单元C++版本的源程序 可以使结构力学的概念更上升一个层次-Three-dimensional beam element framework for C++ Version of the source can make the concept of structural mechanics even went up a level
- 2022-08-19 07:47:18下载
- 积分:1
-
区间消去法,主要用于解决优化问题中的区间确定问题
区间消去法,主要用于解决优化问题中的区间确定问题-Interval elimination method, mainly for optimization problems to resolve the issues identified in the interval
- 2022-07-03 11:07:21下载
- 积分:1
-
完全使用C++写的高效线性代数运算库!还提供了矩阵类。
完全使用C++写的高效线性代数运算库!还提供了矩阵类。--Highly effective linear algebra operating library which written in C++ completely ! It also provides the matrix class
- 2022-03-21 00:10:57下载
- 积分:1
-
一个实用的复杂卡尔曼滤波,对初学者很有帮助。
一个实用的复杂卡尔曼滤波,对初学者很有帮助。
-The complexity of a practical Kalman filter, useful for beginners.
- 2022-07-26 23:49:26下载
- 积分:1
-
邮政运输 2007年D题 邮政运输网络中的邮路规划和邮车调度 数学建模题目...
邮政运输 2007年D题 邮政运输网络中的邮路规划和邮车调度 数学建模题目-Post transport D title in 2007 the postal routes in the transport network planning and scheduling Postal mathematical modeling topics
- 2022-07-04 14:24:58下载
- 积分:1
-
3n+1的算法
acm程序设计大赛的练习题目
3n+1的算法
acm程序设计大赛的练习题目-3n algorithm acm a program design contest entitled to practice
- 2022-08-15 14:41:36下载
- 积分:1