tcplane/
lib.rs

1//! tcplane
2//!
3//! tcplane is a lightweight and high-performance Rust TCP server
4//! library designed to simplify network service development.
5//! It supports TCP communication, data stream management,
6//! and connection handling, focusing on providing efficient
7//! low-level network connections and data transmission capabilities,
8//! making it ideal for building modern network services.
9
10pub(crate) mod cfg;
11pub(crate) mod common;
12pub(crate) mod config;
13pub(crate) mod context;
14pub(crate) mod handler;
15pub(crate) mod middleware;
16pub(crate) mod request;
17pub(crate) mod response;
18pub(crate) mod server;
19pub(crate) mod stream;
20pub(crate) mod utils;
21
22pub use config::*;
23pub use context::*;
24pub use request::*;
25pub use response::*;
26pub use server::*;
27pub use stream::*;
28pub use utils::*;
29
30pub use tokio;
31
32pub(crate) use common::*;
33pub(crate) use handler::*;
34pub(crate) use middleware::*;
35
36pub(crate) use std::{
37    any::Any,
38    collections::HashMap,
39    error::Error as StdError,
40    fmt::{self, Display},
41    future::Future,
42    net::{IpAddr, Ipv4Addr, SocketAddr, SocketAddrV4},
43    panic::set_hook,
44    pin::Pin,
45    sync::Arc,
46};
47pub(crate) use tokio::{
48    io::{AsyncReadExt, AsyncWriteExt},
49    net::{TcpListener, TcpStream},
50    sync::{MutexGuard, RwLock, RwLockReadGuard, RwLockWriteGuard},
51};