Receives a message from the WebSocket.
(&self, py: Python)
| 70 | |
| 71 | /// Receives a message from the WebSocket. |
| 72 | pub fn recv(&self, py: Python) -> PyResult<Option<Message>> { |
| 73 | py.allow_threads(|| { |
| 74 | pyo3_async_runtimes::tokio::get_runtime().block_on(WebSocket::_recv(self.0.receiver())) |
| 75 | }) |
| 76 | } |
| 77 | |
| 78 | /// Sends a message to the WebSocket. |
| 79 | #[pyo3(signature = (message))] |