Skip to content

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.

ASGIAppmodule-attribute

ASGIApp = Callable[[Scope, Receive, Send], Awaitable[None]]

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

Messagemodule-attribute