indexbus_kit/transport/
mod.rs

1//! Transport helpers and re-exports.
2//!
3//! The default `indexbus-kit` path is SHM (`crate::shm`). These optional modules expose
4//! additional transports useful for tests, benchmarks, and edge networking.
5
6#[cfg(feature = "transport-local")]
7pub mod local {
8    //! Local/in-process transport.
9    pub use indexbus_transport_local::*;
10}
11
12#[cfg(feature = "transport-udp")]
13pub mod udp {
14    //! UDP transport and helpers.
15    pub use indexbus_transport_udp::{
16        NetReceiver, NetReceiverStatsSnapshot, NetSender, PeerSeqStats, RecvToShmOptions,
17        RecvToShmResult,
18    };
19
20    pub mod protocol {
21        //! UDP wire protocol helpers (encode/decode, constants, and error types).
22        pub use indexbus_transport_udp::{
23            decode_packet, encode_packet, max_frames_for_mtu, DecodedMessages, DecodedPacket,
24            ProtocolError, DEFAULT_MTU, FRAME_SIZE, HEADER_SIZE, MAGIC, VERSION,
25        };
26    }
27}
28
29#[cfg(feature = "transport-local")]
30pub use local::*;
31
32#[cfg(feature = "transport-udp")]
33pub use udp::*;