(self)
| 363 | raise |
| 364 | |
| 365 | def read_text(self) -> str: |
| 366 | opcode, payload = _read_ws_frame(self._reader) |
| 367 | if opcode != 0x1: |
| 368 | raise AssertionError(f"expected text frame, got opcode {opcode}") |
| 369 | return payload.decode("utf-8") |
| 370 | |
| 371 | def send_text(self, text: str) -> None: |
| 372 | self._sock.sendall(_encode_client_ws_frame(0x1, text.encode("utf-8"))) |
no test coverage detected