Skip to main content

Crate zerodds_transport_udp

Crate zerodds_transport_udp 

Source
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_v4 with 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 the MAX_DATAGRAM_SIZE cap.

§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 parallel bind_v6 + Ipv6Addr code 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§

UdpTransportError
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).