Files
cpp-httplib/docs-src/pages/ja/cookbook
yhirose 7bd99c5ddf Add Server::set_accept_handler() to refuse connections before reading
There was no way to refuse a connection before the server read a
request from it, or before the TLS handshake on SSLServer. The earliest
hook was the pre-routing handler, after the request head had been read.

set_accept_handler() takes a callback that gets each accepted socket
and returns whether to serve it. Both accept paths, with and without
keep-alive parking, go through one function, admit_accepted_socket(),
which sets the socket timeouts first, so that a handler reading from
the socket cannot block forever. A refused or throwing handler closes
the socket; an exception is reported as Error::UserCallbackException.

Fix #2700
2026-11-27 19:42:04 -05:00
..
2026-04-10 18:47:42 -04:00
2026-09-14 12:27:52 -04:00