Skip to main content

kcp/
lib.rs

1//! [KCP](https://github.com/skywind3000/kcp) implementation in Rust.
2//!
3//! A Fast and Reliable ARQ Protocol
4
5#![feature(stmt_expr_attributes)]
6
7extern crate bytes;
8#[macro_use]
9extern crate log;
10
11mod error;
12mod kcp;
13
14/// The `KCP` prelude
15pub mod prelude {
16    pub use super::Kcp;
17    pub use super::get_conv;
18}
19
20pub use error::Error;
21pub use kcp::{Kcp, get_conv, get_token};
22
23#[cfg(feature = "byte-check")]
24pub use kcp::{DEFAULT_KCP_OVERHEAD, MAX_KCP_OVERHEAD, compute_hash};
25
26/// KCP result
27pub type KcpResult<T> = Result<T, Error>;