1 from socket import socket
2 from threading import Condition, Lock
3 from typing import Mapping, Sequence
5 from waitress.adjustments import Adjustments
6 from waitress.buffers import OverflowableBuffer
7 from waitress.parser import HTTPRequestParser
8 from waitress.server import BaseWSGIServer
9 from waitress.task import ErrorTask, WSGITask
11 from . import wasyncore as wasyncore
13 class ClientDisconnected(Exception): ...
15 class HTTPChannel(wasyncore.dispatcher):
16 task_class: WSGITask = ...
17 error_task_class: ErrorTask = ...
18 parser_class: HTTPRequestParser = ...
19 request: HTTPRequestParser = ...
20 last_activity: float = ...
21 will_close: bool = ...
22 close_when_flushed: bool = ...
23 requests: Sequence[HTTPRequestParser] = ...
24 sent_continue: bool = ...
25 total_outbufs_len: int = ...
26 current_outbuf_count: int = ...
27 server: BaseWSGIServer = ...
28 adj: Adjustments = ...
29 outbufs: Sequence[OverflowableBuffer] = ...
30 creation_time: float = ...
31 sendbuf_len: int = ...
33 outbuf_lock: Condition = ...
34 addr: tuple[str, int] = ...
36 self, server: BaseWSGIServer, sock: socket, addr: str, adj: Adjustments, map: Mapping[int, socket] | None = ...
38 def writable(self) -> bool: ...
39 def handle_write(self) -> None: ...
40 def readable(self) -> bool: ...
41 def handle_read(self) -> None: ...
42 def received(self, data: bytes) -> bool: ...
44 def handle_close(self) -> None: ...
45 def add_channel(self, map: Mapping[int, socket] | None = ...) -> None: ...
46 def del_channel(self, map: Mapping[int, socket] | None = ...) -> None: ...
47 def write_soon(self, data: bytes) -> int: ...
48 def service(self) -> None: ...
49 def cancel(self) -> None: ...