diff options
| author | Xavier Del Campo Romero <xavi92@disroot.org> | 2025-10-06 21:03:59 +0200 |
|---|---|---|
| committer | Xavier Del Campo Romero <xavi92@disroot.org> | 2025-10-06 21:03:59 +0200 |
| commit | db9cb051c4ee05c07ab32dfed5bae8b7dc0916bd (patch) | |
| tree | 44e1efae86af612923ec5486c00eb2c56019c865 /doc | |
| parent | 4918cf87d3cf5d3dd8425fe10d97a06282472df6 (diff) | |
Allow custom backlog connections
libweb calls listen(2) when setting up the HTTP server, and its backlog
argument was hardcoded to 10. While probably not an issue for some
applications, it can be too limiting for some others.
Therefore, it is desirable to allow library users to set up their own
limits. Otherwise, 10 is still chosen as a sane default.
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/man7/libweb_handler.7 | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/doc/man7/libweb_handler.7 b/doc/man7/libweb_handler.7 index 4b0c454..5398675 100644 --- a/doc/man7/libweb_handler.7 +++ b/doc/man7/libweb_handler.7 @@ -77,6 +77,7 @@ struct handler_cfg void *\fIuser\fP; size_t \fImax_headers\fP; struct http_cfg_post \fIpost\fP; + unsigned \fIbacklog\fP; }; .EE .in @@ -96,6 +97,19 @@ object. See .IR libweb_http (7) for further reference about these members. +On the other hand, +.I backlog +is passed directly to the call to +.IR listen (2) +done internally by +.IR libweb , +and must not exceed +.IR INT_MAX . +If +.I backlog +equals zero, +it shall default to 10. + However, a .I "struct handler" object as returned by @@ -235,7 +249,8 @@ end: .BR handler_free (3), .BR handler_listen (3), .BR handler_loop (3), -.BR libweb_http (7). +.BR libweb_http (7), +.BR listen (2). .SH COPYRIGHT Copyright (C) 2023-2024 libweb contributors |
