Expand description
Crate zerodds-transport-udp. Safety classification: SAFE (std-only).
UDP/IP PSM implementation of the zerodds-transport::Transport trait.
§Spec
- DDSI-RTPS 2.5 §9.6.1 — UDP/IP PSM wire mapping.
- DDSI-RTPS 2.5 §8.3.2 — locator (re-export from
zerodds-transport).
§Implemented (RC1)
- UDPv4 unicast bind + send + recv via
std::net::UdpSocket - UDPv4 multicast:
bind_multicast_v4with group join +SO_REUSEADDR/SO_REUSEPORT+set_multicast_ttl_v4(DDSI-RTPS §9.6.1.4 SPDP/SEDP discovery path) - Read timeout configurable via
with_timeout - Bind retry loop for the CI EADDRINUSE race (3× backoff)
- Application-layer fragmentation in
zerodds-rtps(DATA_FRAG/NACK_FRAG, WP 1.2) handles MTU — the transport itself sends datagrams atomically with theMAX_DATAGRAM_SIZEcap.
§Deliberately not in the crate
- UDPv6: the locator wire format supports v6, but the bind API is
v4-specific (
bind_v4). v6 would require a parallelbind_v6+Ipv6Addrcode path. An extension point — no layer break. - Async/non-blocking: the sync architecture is a chosen style — DCPS uses its own tick scheduler, no Tokio stack.
- Path-MTU discovery: fragmentation runs at the RTPS layer (WP 1.2).
Structs§
- UdpTransport
- UDP-based transport.
Enums§
- UdpTransport
Error - Construction error.
Constants§
- MAX_
DATAGRAM_ SIZE - Maximum datagram size for a UDP recv. Bounded to the classic IP datagram limit without fragmentation (safe for phase 0).