duck.http.core.httpd.http2.event_handler¶
H2 Event handler module.
Module Contents¶
Classes¶
HTTP/2 Event handler. |
API¶
- class duck.http.core.httpd.http2.event_handler.EventHandler(protocol, server)[source]¶
HTTP/2 Event handler.
This handles
h2events asynchrously.Initialization
- __slots__¶
None
- async execute_synchronously_in_current_thread(func: Callable)[source]¶
Adds a callable to
sync_queueso that it will be executed outside async context, useful in multithreaded environment where threads are created for each connection andASYNC_HANDLING=False- Parameters:
func – Callable function or method which doesn’t accept any arguments.
- on_stream_reset(stream_id: int)[source]¶
Called when the client resets a stream.
This can occur when:
The client cancels an in-progress request.
The client connection is aborted or timed out.
An internal protocol error is detected.
Cleans up any cached request data, pending flow control futures, or in-progress tasks associated with the given stream.
- Parameters:
stream_id – The HTTP/2 stream ID that was reset.