hypercorn.protocol.h11 module

class hypercorn.protocol.h11.H11Protocol(app: Union[Type[hypercorn.typing.ASGI2Protocol], Callable[[dict, Callable, Callable], 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
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