1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
//! # kcp-io
//!
//! A Rust wrapper for the [KCP](https://github.com/skywind3000/kcp) protocol,
//! providing FFI bindings, a safe API, and async tokio integration.
//!
//! ## Features
//!
//! - **`kcp-sys`** — Raw FFI bindings to the KCP C library
//! - **`kcp-core`** — Safe Rust wrapper (implies `kcp-sys`)
//! - **`kcp-tokio`** — Async tokio integration (implies `kcp-core`, enabled by default)
//!
//! ## Quick Start
//!
//! ```no_run
//! use kcp_io::tokio_rt::{KcpStream, KcpSessionConfig};
//!
//! # async fn example() -> Result<(), Box<dyn std::error::Error>> {
//! let mut stream = KcpStream::connect("127.0.0.1:8080", KcpSessionConfig::fast()).await?;
//! stream.send_kcp(b"hello").await?;
//!
//! let data = stream.recv_kcp().await?;
//! println!("Received: {:?}", data);
//! # Ok(())
//! # }
//! ```
// FFI bindings — always compiled (C code is always linked)
// Internal sys module (always available for core/tokio, but not public without feature)
pub
// Safe wrapper
// Async tokio integration
// Convenience re-exports when kcp-tokio is enabled (default)
pub use ;
// Convenience re-exports when kcp-core is enabled
pub use ;