Skip to main content

unix_handle_client

Function unix_handle_client 

Source
fn unix_handle_client(
    stream: UnixStream,
    state: &Arc<Mutex<WebState>>,
    html: &str,
)
Expand description

Serve one unix-socket client with a minimal HTTP/1.1 response. The two routes mirror the tiny_http server: / serves the embedded HTML (no-store), /api/stats the live metrics JSON, everything else a 404. A malformed request is dropped silently.