MoldUDP64 Client for Rust
A blazingly fast MoldUDP64 client in Rust.
Features
- Automatically re-requests dropped/ missing packets
- Multiple re-request servers
- Automatically retries failed re-requests with configurable limit.
- Lock free
- ZERO hot path allocations
- Allocation free data structures to inspect packets.
Usage
cargo add moldudp
use ;
use ;
let = builder
// Multicast group + port carrying the live downstream feed.
.multicast_addr
// Local NIC to join on. Use `UNSPECIFIED` to let the OS pick.
.interface_addr
// One or more re-request servers. The client load-balances requests
// across them and merges responses back into the same stream.
.rerequest_server_addrs
// Optional: pin the expected session. If set, packets from any other
// session ident are dropped. If omitted, the client locks onto the
// first session it sees.
.expected_session_ident
// Optional: starting sequence number. Defaults to 1 (the start of
// the session) if omitted; gaps before this point are not requested.
.expected_seq_num
.build
.start?;
// Datagrams arrive in receive order — live and retransmitted packets are
// interleaved. The consumer is responsible for ordering by seq num.
// Minimal validation is done on datagrams, only that they are at least
// 20 bytes in length.
while let Ok = rx.recv
Roadmap
- Zero copy reads from network socket