Skip to main content

Module net

Module net 

Source
Expand description

Socket setup helpers: listeners with SO_REUSEPORT (one per worker for share-nothing accept), nonblocking tuning, keepalive.

Structs§

StreamFd
Raw stream descriptor owned by a session. Closed on drop.

Functions§

set_keepalive
Sets aggressive keepalive so dead upstreams are noticed.
set_nodelay
Sets TCP_NODELAY (request latency over Nagle).
shutdown_write
shutdown(SHUT_WR) — half-close (finishes streaming responses).
tcp_listener
Creates a nonblocking TCP listener bound to addr.