ASGI applications and aliases¶
These aliases describe the callable boundary between an ASGI application and h2corn. Application accepts either the precise ASGIApp contract or the broader mutable-mapping annotations used by framework applications.
FrameworkASGIAppmodule-attribute¶
FrameworkASGIApp = Callable[[MutableMapping[str, Any], FrameworkReceive, FrameworkSend], Awaitable[None]]
Applicationmodule-attribute¶
Application = ASGIApp | FrameworkASGIApp
Receivemodule-attribute¶
Receive = Callable[[], Awaitable[ReceiveMessage]]
Sendmodule-attribute¶
Send = Callable[[SendMessage], Awaitable[None]]
Scopemodule-attribute¶
Scope = HTTPScope | WebSocketScope | LifespanScope
ReceiveMessagemodule-attribute¶
ReceiveMessage = HTTPRequest | HTTPDisconnect | WebSocketConnect | WebSocketReceiveBytes | WebSocketReceiveText | WebSocketDisconnect | LifespanStartup | LifespanShutdown
SendMessagemodule-attribute¶
SendMessage = HTTPResponseStart | HTTPResponseBody | HTTPResponseTrailers | HTTPResponsePathsend | HTTPResponseZeroCopySend | HTTPResponseEarlyHint | WebSocketAccept | WebSocketSendBytes | WebSocketSendText | WebSocketClose | WebSocketHTTPResponseStart | WebSocketHTTPResponseBody | LifespanStartupComplete | LifespanStartupFailed | LifespanShutdownComplete | LifespanShutdownFailed
Messagemodule-attribute¶
Message = ReceiveMessage | SendMessage