network-protocol 1.2.1

Secure, high-performance protocol core with backpressure control, structured logging, timeout handling, TLS support, and comprehensive benchmarking for robust Rust networked applications and services.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use network_protocol::transport::local;

#[tokio::main]
async fn main() {
    // Path is interpreted as a unix socket path on Unix systems
    // and as a TCP port on localhost for Windows systems
    let socket_path = "/tmp/my.sock";
    
    if let Err(e) = local::start_server(socket_path).await {
        eprintln!("Server failed: {e}");
    }
}