| 65 | """ |
| 66 | |
| 67 | def __init__( |
| 68 | self, |
| 69 | protocol: ServerProtocol, |
| 70 | server: Server, |
| 71 | *, |
| 72 | ping_interval: float | None = 20, |
| 73 | ping_timeout: float | None = 20, |
| 74 | close_timeout: float | None = 10, |
| 75 | max_queue: int | None | tuple[int | None, int | None] = 16, |
| 76 | write_limit: int | tuple[int, int | None] = 2**15, |
| 77 | ) -> None: |
| 78 | self.protocol: ServerProtocol |
| 79 | super().__init__( |
| 80 | protocol, |
| 81 | ping_interval=ping_interval, |
| 82 | ping_timeout=ping_timeout, |
| 83 | close_timeout=close_timeout, |
| 84 | max_queue=max_queue, |
| 85 | write_limit=write_limit, |
| 86 | ) |
| 87 | self.server = server |
| 88 | self.request_rcvd: asyncio.Future[None] = self.loop.create_future() |
| 89 | self.username: str # see basic_auth() |
| 90 | self.handler: Callable[[ServerConnection], Awaitable[None]] # see route() |
| 91 | self.handler_kwargs: Mapping[str, Any] # see route() |
| 92 | |
| 93 | def respond(self, status: StatusLike, text: str) -> Response: |
| 94 | """ |