(self, send: ASGISendCallable, data: AnyStr)
| 307 | ) |
| 308 | |
| 309 | async def send_data(self, send: ASGISendCallable, data: AnyStr) -> None: |
| 310 | if isinstance(data, str): |
| 311 | await send({"type": "websocket.send", "bytes": None, "text": data}) |
| 312 | else: |
| 313 | await send({"type": "websocket.send", "bytes": data, "text": None}) |
| 314 | await websocket_sent.send_async(data) |
| 315 | |
| 316 | async def accept_connection( |
| 317 | self, send: ASGISendCallable, headers: Headers, subprotocol: str | None |