cwist
Modern C web framework with libttak runtime
Loading...
Searching...
No Matches
sockopts.h File Reference

Listen-socket option knobs shared by the bind sites (private). More...

#include <stdbool.h>
Include dependency graph for sockopts.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

bool cwist_reuseport_enabled (void)
 

Detailed Description

Listen-socket option knobs shared by the bind sites (private).

Definition in file sockopts.h.

Function Documentation

◆ cwist_reuseport_enabled()

bool cwist_reuseport_enabled ( void  )

Whether listen sockets get SO_REUSEPORT where the OS has it. Default on; CWIST_REUSEPORT=0/false disables, which restores bind() failure on a port conflict (and therefore requires a single worker process). Read at every bind, so worker children re-created after fork honor the same environment.

Definition at line 5347 of file http.c.

References cap.

Referenced by cwist_async_server_loop(), and cwist_make_socket_ipv4().