Expand description
Part of the nwd1 family — Network Wire Data v1 transport suite:
- [
netid64] → unique 64‑bit identifiers for network‑scoped entities nwd1→ core binary frame definition- [
nwd1-quic] → QUIC transport adapter - [
nwd1-webtransport] → WebTransport (HTTP/3) adapter for browsers
Together they form a unified, transport‑safe data layer from raw QUIC to browser.
“nwd1” = Network Wire Data v1 — a minimal binary frame: MAGIC | LEN | ID | KIND | VER | PAYLOAD.
This crate provides generic async helpers that work over any Tokio AsyncRead/AsyncWrite
Design goals:
- Transport-agnostic helpers (server <-> browser via WebTransport planned)
- Zero ambiguity in framing, big-endian network order
- Early MAGIC check and length caps for safety
Constants§
- DEFAULT_
FRAME_ LEN_ SOFT - Reasonable default soft cap for browser-oriented traffic (256 KiB)
- MAX_
FRAME_ LEN_ HARD - Hard safety ceiling against pathological allocations (8 MiB)
Functions§
- recv_
frame - Receive a single nwd1 frame from any Tokio
AsyncRead. ReturnsOk(None)on graceful EOF before a full header is read. - send_
frame - Send a single nwd1 frame over any Tokio
AsyncWrite.