hypercorn.protocol.h11 module

class hypercorn.protocol.h11.H11Protocol(app: Union[Type[hypercorn.typing.ASGI2Protocol], Callable[[Union[hypercorn.typing.HTTPScope, hypercorn.typing.WebsocketScope, hypercorn.typing.LifespanScope], Callable[], Awaitable[Union[hypercorn.typing.HTTPRequestEvent, hypercorn.typing.HTTPDisconnectEvent, hypercorn.typing.WebsocketConnectEvent, hypercorn.typing.WebsocketReceiveEvent, hypercorn.typing.WebsocketDisconnectEvent, hypercorn.typing.LifespanStartupEvent, hypercorn.typing.LifespanShutdownEvent]]], Callable[[Union[hypercorn.typing.HTTPResponseStartEvent, hypercorn.typing.HTTPResponseBodyEvent, hypercorn.typing.HTTPServerPushEvent, hypercorn.typing.HTTPDisconnectEvent, hypercorn.typing.WebsocketAcceptEvent, hypercorn.typing.WebsocketSendEvent, hypercorn.typing.WebsocketResponseStartEvent, hypercorn.typing.WebsocketResponseBodyEvent, hypercorn.typing.WebsocketCloseEvent, hypercorn.typing.LifespanStartupCompleteEvent, hypercorn.typing.LifespanStartupFailedEvent, hypercorn.typing.LifespanShutdownCompleteEvent, hypercorn.typing.LifespanShutdownFailedEvent]], Awaitable[None]]], Awaitable[None]]], config: hypercorn.config.Config, context: hypercorn.typing.Context, ssl: bool, client: Optional[Tuple[str, int]], server: Optional[Tuple[str, int]], send: Callable[[hypercorn.events.Event], Awaitable[None]])

Bases: object

async handle(event: hypercorn.events.Event)None
property idle: bool
async initiate()None
async stream_send(event: hypercorn.protocol.events.Event)None
class hypercorn.protocol.h11.H11WSConnection(h11_connection: h11._connection.Connection)

Bases: object

next_event()hypercorn.protocol.events.Data
our_state = None
receive_data(data: bytes)None
send(event: Union[h11._events.Data, h11._events.EndOfMessage, h11._events.InformationalResponse, h11._events.Response])bytes
they_are_waiting_for_100_continue = False
exception hypercorn.protocol.h11.H2CProtocolRequired(data: bytes, request: h11._events.Request)

Bases: Exception

exception hypercorn.protocol.h11.H2ProtocolAssumed(data: bytes)

Bases: Exception