openigtlink_rust/io/mod.rs
1//! Network I/O module for OpenIGTLink communication
2//!
3//! Provides client and server implementations for OpenIGTLink connections
4//! over both TCP (reliable) and UDP (low-latency) transports.
5//!
6//! # Client Creation
7//!
8//! Use [`ClientBuilder`] for type-safe client construction:
9//!
10//! ```no_run
11//! use openigtlink_rust::io::builder::ClientBuilder;
12//!
13//! # async fn example() -> Result<(), openigtlink_rust::error::IgtlError> {
14//! // TCP async client
15//! let client = ClientBuilder::new()
16//! .tcp("127.0.0.1:18944")
17//! .async_mode()
18//! .build()
19//! .await?;
20//! # Ok(())
21//! # }
22//! ```
23
24pub mod async_server;
25pub mod builder;
26mod common;
27pub mod reconnect;
28pub mod server;
29mod sync_client;
30pub mod tls_server;
31pub mod udp;
32pub mod unified_async_client;
33pub mod unified_client;
34
35// Client builder API (recommended)
36pub use builder::ClientBuilder;
37pub use reconnect::ReconnectConfig;
38pub use unified_client::{AsyncIgtlClient, SyncIgtlClient};
39
40// Server APIs
41pub use async_server::{
42 AsyncIgtlConnection, AsyncIgtlConnectionReader, AsyncIgtlConnectionWriter, AsyncIgtlServer,
43};
44pub use server::{IgtlConnection, IgtlServer};
45pub use tls_server::{TlsIgtlConnection, TlsIgtlServer};
46
47// UDP
48pub use udp::{UdpClient, UdpServer};