uflow 0.7.1

Provides ordered, mixed-reliability, and congestion-controlled data transfer over UDP
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

pub type Type = u32;

pub const MASK: Type = 0xFFFFF;
pub const SPAN: Type = 0x100000;

pub fn add(a: Type, b: Type) -> Type {
    a.wrapping_add(b) & MASK
}

pub fn sub(a: Type, b: Type) -> Type {
    a.wrapping_sub(b) & MASK
}

pub fn is_valid(a: Type) -> bool {
    a & MASK == a
}