(self, data: bytes)
| 145 | pass |
| 146 | |
| 147 | def data_received(self, data: bytes) -> None: |
| 148 | try: |
| 149 | self.conn.receive_data(data) |
| 150 | except RemoteProtocolError as err: |
| 151 | # TODO: Remove `type: ignore` when wsproto fixes the type annotation. |
| 152 | self.transport.write(self.conn.send(err.event_hint)) # type: ignore[arg-type] # noqa: E501 |
| 153 | self.transport.close() |
| 154 | else: |
| 155 | self.handle_events() |
| 156 | |
| 157 | def handle_events(self) -> None: |
| 158 | for event in self.conn.events(): |
nothing calls this directly
no test coverage detected