Crate tcplane

Source
Expand description

tcplane

tcplane is a lightweight and high-performance Rust TCP server library designed to simplify network service development. It supports TCP communication, data stream management, and connection handling, focusing on providing efficient low-level network connections and data transmission capabilities, making it ideal for building modern network services.

Re-exports§

pub use tokio;

Structs§

ArcRwLockStream
Context
Context structure.
InnerContext
Internal context structure.
Response
Server
Server structure.

Enums§

ResponseError
ServerError

Constants§

COLON_SPACE
Colon space separator string.
COLON_SPACE_SYMBOL
Colon space symbol string.
DEFAULT_BUFFER_SIZE
Default buffer size for requests.
DEFAULT_HOST
Default host address.
DEFAULT_INNER_LOG
Default inner log setting.
DEFAULT_INNER_PRINT
Default inner print setting.
DEFAULT_LISTEN_PORT
Default listen port number.
SPLIT_REQUEST
Request split marker string.
SPLIT_REQUEST_BYTES
Request split marker bytes.

Functions§

get_thread_count
remove_trailing_zeros

Type Aliases§

ArcAnySendSync
An Arc pointer to a type that is Any, Send, and Sync.
ArcMutexGuardTcpStream
ArcRwLockWriteGuardTcpStream
ArcStream
AsyncArcRwLock
HashMapArcAnySendSync
A hash map storing ArcAnySendSync values, keyed by String.
OptionArcMutexGuardTcpStream
OptionArcRwLockStream
OptionArcRwLockWriteGuardTcpStream
OptionArcTcpStream
OptionSocketAddr
OptionSocketHost
OptionSocketPort
Request
ResponseData
Binary data for HTTP response.
ResponseResult
Result type for response operations.
RwLockReadContext
A read guard for the InnerContext.
RwLockReadGuardTcpStream
RwLockWriteContext
A write guard for the InnerContext.
RwLockWriteGuardTcpStream