Skip to main content

zerodds_transport_tcp/
lib.rs

1// SPDX-License-Identifier: Apache-2.0
2// Copyright 2026 ZeroDDS Contributors
3//! Crate `zerodds-transport-tcp`. Safety classification: **STANDARD**.
4//!
5//! ZeroDDS-TCP-Transport — RTPS-over-TCP mit Length-Prefix-Framing
6//! und optionalem ZeroDDS-eigenem 16-Byte-Handshake.
7//!
8//! ## Spec
9//!
10//! - **DDSI-RTPS 2.5 §9.4** — Locator-Kinds `TCPv4`=4, `TCPv6`=8.
11//! - **DDSI-RTPS 2.5 §9.5** — Wire-Bytes-Mapping (RTPS-Header +
12//!   Submessages, identisch zum UDP-PSM).
13//! - **ZeroDDS-TCP-Transport 1.0** — vendor-spezifischer Transport-
14//!   Spec (Length-Prefix-Framing + Handshake),
15//!   `docs/spec-coverage/zerodds-tcp-transport-1.0.md`.
16//!
17//! ## Hinweis zur OMG-Normativität
18//!
19//! OMG normiert nur Locator-Kind + Wire-Mapping (s.o.). Es gibt
20//! **keinen** normativen "DDS-TCP-PSM"-Handshake-Spec. Cyclone's
21//! `ddsi_tcp` nutzt raw RTPS-Frames ohne Handshake; FastDDS und RTI
22//! haben jeweils eigene vendor-spezifische BindConnection-Formate.
23//! ZeroDDS definiert seine eigene Variante explizit als
24//! ZeroDDS-TCP-Transport-1.0-Spec (siehe oben).
25//!
26//! ## Implementiert (RC1)
27//!
28//! - Length-Prefix-Frame (4 Byte BE) — DDSI-RTPS-§9.5-konform.
29//! - 16-Byte ZeroDDS-Handshake mit Magic + Version + Vendor-Id +
30//!   Logical-Port + Reason-Code.
31//! - Cyclone-`ddsi_tcp`-Compat: Handshake-Skip-Mode für raw RTPS-
32//!   Frames.
33//! - `TcpTransport`-Pool mit Connection-Reuse + Backoff.
34//!
35//! ## Cross-Vendor-Interop
36//!
37//! - ZeroDDS ↔ ZeroDDS: voll (Handshake aktiv).
38//! - ZeroDDS ↔ Cyclone: voll via Handshake-Skip-Mode.
39//! - ZeroDDS ↔ FastDDS/RTI: Erweiterungspunkt (vendor-spezifische
40//!   Handshake-Formate; nicht-OMG-normativ). Siehe
41//!   ZeroDDS-TCP-Transport-1.0-Spec §6.
42
43#![deny(unsafe_code)]
44#![warn(missing_docs)]
45
46pub mod framing;
47pub mod handshake;
48pub mod tcp_transport;
49
50pub use tcp_transport::{TcpTransport, TcpTransportError};