Skip to main content

start_high_perf

Function start_high_perf 

Source
pub async fn start_high_perf(
    server: Server,
    limits: PerfLimits,
) -> Result<(), ServerError>
Available on crate feature high-perf only.
Expand description

Starts an async-first accept loop with adaptive backpressure.

This path prioritizes throughput-per-core by avoiding a thread-per-connection model, enforcing queue limits, and using a sendfile fast-path for large static files.

§Examples

use http_handle::perf_server::{start_high_perf, PerfLimits};
use http_handle::Server;
let server = Server::new("127.0.0.1:8080", ".");
let _ = start_high_perf(server, PerfLimits::default()).await;

§Errors

Returns an error when socket binding or accept fails.

§Panics

This function does not panic.