mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2026-11-21 20:01:46 +00:00
Give a parked connection transport hooks
KeepAliveConnection becomes a base that parking_loop() and resume_connection() drive without knowing the transport. PlainConnection holds the SocketStream, and Server::new_keep_alive_connection() makes one for each accepted socket, so that SSLServer can add a TLS connection next. A connection now counts as established for a full queue once a worker has opened it, which for plain HTTP is when it has been served, as before. Closing happens explicitly in the event loop and on the worker; the destructor is only a net. No change in behaviour.
This commit is contained in:
1 parent
2a6854c935
commit
d730627815
2 files changed
+138
-52
No files matched your search
@@ -933,7 +933,7 @@ With it:
|
||||
- When the [max queued requests](#max-queued-requests) limit is reached, only a connection that has not been served yet is closed. An established one waits for room.
|
||||
- Each request pays for handing the connection over, so with no more connections than threads and very light handlers, it can serve fewer requests per second.
|
||||
- A handler, a content provider and a WebSocket still hold their thread while they run.
|
||||
- `SSLServer` ignores it for now, and an override of `process_and_close_socket()` is not called.
|
||||
- `SSLServer` ignores it for now.
|
||||
|
||||
### Client address behind a reverse proxy
|
||||
|
||||
|
||||
Reference in new issue
Block a user