hypercorn.protocol.h2 module

exception hypercorn.protocol.h2.BufferCompleteError

Bases: Exception

class hypercorn.protocol.h2.H2Protocol(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(headers: Optional[List[Tuple[bytes, bytes]]] = None, settings: Optional[str] = None) → None
async send_task() → None
async stream_send(event: hypercorn.protocol.events.Event) → None
class hypercorn.protocol.h2.StreamBuffer(event_class: Type[hypercorn.typing.Event])

Bases: object

async close() → None
property complete
async drain() → None
async pop(max_length: int) → bytes
async push(data: bytes) → None
set_complete() → None