Skip to main content

amqp_dds_endpoint/
lib.rs

1// SPDX-License-Identifier: Apache-2.0
2// Copyright 2026 ZeroDDS Contributors
3
4//! DDS-AMQP 1.0 Endpoint Daemon — Library-Layer.
5//!
6//! Safety classification: **TOOLING** (Server-Daemon-Bibliothek;
7//! kein safety-relevanter Runtime-Code, std-only).
8//!
9//! Synchronen, `std`-only AMQP-1.0-Server-Daemon. Wir lesen
10//! AMQP-Frames blocking auf einer `TcpStream`-Verbindung und
11//! treiben die `zerodds-amqp-endpoint`-State-Machine.
12//!
13//! Spec-Quellen:
14//! * dds-amqp-1.0 §2.1 Endpoint Profile (Cl. 2 Connection
15//!   Acceptance, Cl. 3 Sender+Receiver Links, Cl. 6 SASL).
16//! * `amqp-1.0-transport` §2.2 Protocol Header,
17//!   §2.3 Frame Layout, §2.4 Connection State.
18//!
19//! Was diese Crate liefert:
20//! * Protocol-Header-Read/Write (`AMQP\0\1\0\0` und SASL-Variant).
21//! * Frame-Read/Write (8-Byte Header + Body).
22//! * Performative-Dispatch (Descriptor → `InboundFrameKind`).
23//! * Per-Connection-Handler (`handle_connection`), der die
24//!   State-Machine treibt.
25//! * `run_server` — Multi-Connection-Accept-Loop mit
26//!   thread-per-connection.
27//!
28//! Was diese Crate **nicht** liefert (separate Folge-Schichten):
29//! * TLS-Termination — Spec §10.1 Daemon-Layer-Welle.
30//! * DDS-Side-Bruecke (DataWriter/Reader) — Spec §2.1 Cl. 3
31//!   Folge-Welle.
32//! * Outbound-Bridge-Mode — Spec §2.2 Cl. 2.
33//! * Reconnect-Loop — Spec §10.8.
34
35#![forbid(unsafe_code)]
36#![warn(missing_docs)]
37// Daemon-Tool — eprintln ist die natuerliche Logging-Form
38// solange tracing/log nicht workspace-weit verfuegbar ist.
39#![allow(clippy::print_stderr)]
40
41pub mod bridge;
42pub mod client;
43pub mod dds_host;
44pub mod frame_io;
45pub mod handler;
46pub mod server;
47#[cfg(feature = "tls")]
48pub mod tls;
49
50pub use client::{
51    ClientConfig, ClientError, OutboundSession, ReconnectConfig, connect_outbound,
52    connect_with_reconnect,
53};
54pub use frame_io::{
55    AmqpProtocol, FrameIoError, ProtocolHeader, read_frame, read_protocol_header, write_frame,
56    write_protocol_header,
57};
58pub use handler::{ConnectionStats, HandlerError, handle_connection};
59pub use server::{ServerConfig, ServerError, run_server};