Ljh684/moonnet-lab/src/net does not have a README file
pub(all) struct Packet[T] {
id : Int
flow : Int
kind : PacketKind
size : Int
tag : UInt64
payload : T
}fn[T] Packet::new(id : Int, flow : Int, kind : PacketKind, size : Int, tag : UInt64, payload : T) -> Packet[T]pub(all) enum PacketKind {
Data
Ack
Syn
SynAck
Fin
}impl Show for PacketKindpub struct PacketQueue[T] {
spec : QueueSpec
rng : Rng
slots : Array[Queued[T]?]
head : Int
count : Int
bytes : Int
admitted : Int
dropped : Int
dropped_bytes : Int
dropped_tail : Int
dropped_early : Int
peak_packets : Int
peak_bytes : Int
occupancy_integral : Int64
observed_at : Time
max_sojourn : Time
first_above : Time
dropping : Bool
drop_next : Time
drop_count : Int
average_occupancy : Double
}pub(all) struct QueueSpec {
max_packets : Int
max_bytes : Int
discipline : QueueDiscipline
} derive(Eq, Debug)type Queued[T]fn default_mtu() -> Intfn format_one_decimal(value : Double) -> Stringfn percent(fraction : Double) -> Stringfn wire_size(bytes : Int) -> IntInstall
Download zipDeterministic packet-level network simulator and TCP congestion-control lab for MoonBit