zerodds_corba_iiop/lib.rs
1// SPDX-License-Identifier: Apache-2.0
2// Copyright 2026 ZeroDDS Contributors
3
4//! OMG CORBA 3.3 Part 2 §14 + §15.7 — Internet Inter-ORB Protocol (IIOP).
5//!
6//! Crate `zerodds-corba-iiop`. Safety classification: **STANDARD**.
7//! Spec OMG CORBA 3.3 Part 2 §14 (IIOP Overview) + §15.7 (IIOP Profile)
8//! + §15.9 (Bidirectional-GIOP).
9//!
10//! # Scope
11//!
12//! Voller IIOP-TCP-Transport-Stack:
13//!
14//! * **ProfileBody** — alle 4 IIOP-Versionen (1.0/1.1/1.2/1.3) inkl.
15//! `host`/`port`/`object_key`/`components` (Spec §15.7.2). 1.0 hat
16//! keine Components-Sequenz; ab 1.1 sind sie Pflicht-Bestandteil.
17//! * **Connection** — TCP-Stream-Wrapper, der GIOP-Messages frame-genau
18//! liest und schreibt (12-Byte-Header -> `message_size` ->
19//! Body-Read).
20//! * **Connector (Client)** — TCP-Connect mit Connection-Reuse und
21//! thread-safe Pool, Connect-Timeout und automatische Reconnect-
22//! Logik bei `CloseConnection`-Empfang.
23//! * **Acceptor (Server)** — TCP-Listener-Loop mit Per-Connection-
24//! Worker-Thread.
25//! * **Bidirectional-GIOP** (Spec §15.9) — Server kann Requests an
26//! den Client schicken nach Aushandlung via `BiDirIIOPServiceContext`.
27//!
28//! ## Beispiel
29//!
30//! ```
31//! use zerodds_corba_iiop::IiopVersion;
32//! assert_eq!(IiopVersion::V1_2.major, 1);
33//! assert_eq!(IiopVersion::V1_2.minor, 2);
34//! ```
35
36#![cfg_attr(not(feature = "std"), no_std)]
37#![forbid(unsafe_code)]
38#![warn(missing_docs)]
39
40#[cfg(feature = "alloc")]
41extern crate alloc;
42
43pub mod bidir;
44pub mod profile_body;
45
46#[cfg(feature = "std")]
47pub mod acceptor;
48#[cfg(feature = "std")]
49pub mod connection;
50#[cfg(feature = "std")]
51pub mod connector;
52#[cfg(feature = "std")]
53pub mod error;
54#[cfg(feature = "std")]
55pub mod framing;
56
57pub use bidir::{BiDirIiopListenPoint, BiDirIiopServiceContext, IIOP_BI_DIR_TAG};
58pub use profile_body::{IiopProfileBody, IiopVersion, TaggedComponent};
59
60#[cfg(feature = "std")]
61pub use acceptor::{Acceptor, AcceptorConfig};
62#[cfg(feature = "std")]
63pub use connection::Connection;
64#[cfg(feature = "std")]
65pub use connector::{Connector, ConnectorConfig};
66#[cfg(feature = "std")]
67pub use error::IiopError;
68#[cfg(feature = "std")]
69pub use framing::{read_giop_message, write_giop_message};