Expand description
udp
A lightweight and efficient Rust library for building UDP servers with request-response handling.
Re-exports§
pub use tokio;
Structs§
- ArcRw
Lock UdpSocket - Thread-safe wrapper for UDP socket with read-write lock.
- Context
- Thread-safe context wrapper for UDP operations.
- Inner
Context - Inner context containing all UDP communication components.
- Response
- UDP response wrapper containing response data.
- Server
- UDP server instance containing configuration and handler functions.
Enums§
- Response
Error - Error types for response operations.
- Server
Error - Error types for server operations.
Constants§
- COLON_
SPACE - COLON_
SPACE_ SYMBOL - DEFAULT_
BUFFER_ SIZE - DEFAULT_
HOST - DEFAULT_
INNER_ LOG - DEFAULT_
INNER_ PRINT - DEFAULT_
LISTEN_ PORT
Functions§
- get_
thread_ count - Gets the number of available threads for parallel processing.
- remove_
trailing_ zeros - Removes trailing zeros from a byte vector.
Type Aliases§
- ArcAny
Send Sync - ArcMutex
Guard UdpSocket - Thread-safe reference-counted mutex guard for UDP socket.
- ArcRw
Lock Write Guard UdpSocket - Thread-safe reference-counted write guard for UDP socket.
- ArcUdp
Socket - Thread-safe reference-counted UDP socket.
- Hash
MapArc AnySend Sync - Option
ArcMutex Guard UdpSocket - Optional thread-safe reference-counted mutex guard for UDP socket.
- Option
ArcRw Lock UdpSocket - Optional thread-safe read-write locked UDP socket.
- Option
ArcRw Lock Write Guard UdpSocket - Optional thread-safe reference-counted write guard for UDP socket.
- Option
ArcUdp Socket - Optional thread-safe reference-counted UDP socket.
- Option
Socket Addr - Optional socket address (IP + port).
- Option
Socket Host - Optional socket host IP address.
- Option
Socket Port - Optional socket port number.
- Request
- Response
Data - Type alias for raw response data (byte vector).
- Response
Result - Result type for response operations.
- RwLock
Read Context - RwLock
Read Guard UdpSocket - Read guard for read-write locked UDP socket.
- RwLock
Write Context - RwLock
Write Guard UdpSocket - Write guard for read-write locked UDP socket.