mirror of
https://github.com/impact-eintr/netstack.git
synced 2025-10-06 13:26:49 +08:00
tcp可靠性实现 抄了一堆东西 信息量太大了 看不过来
This commit is contained in:
@@ -46,6 +46,7 @@ func (v *Value) UpdateForward(s Size) {
|
||||
}
|
||||
|
||||
// Overlap checks if the window [a,a+b) overlaps with the window [x, x+y).
|
||||
// [a,x+y)&&[x, a+b) [a, x, a+b, x+y) [a, x, x+y, a+b) [x, a, a+b, x+y) [x, a, x+y, a+b)
|
||||
func Overlap(a Value, b Size, x Value, y Size) bool {
|
||||
return a.LessThan(x.Add(y)) && x.LessThan(a.Add(b))
|
||||
}
|
||||
|
Reference in New Issue
Block a user