Tornado 6.5 Documentation
Client-side support tornado.websocket.websocket_connect(url: str | HTTPRequest, callback: Callable[[Future[WebSocketClientConnection]], None] | None = None, connect_timeout: float | None = None, on_message_callback: yield websocket_connect(url) while True: msg = yield conn.read_message() if msg is None: break # Do something with msg In the callback style, pass an on_message_callback to websocket_connect. In both styles WebSocket client connection. This class should not be instantiated directly; use the websocket_connect function instead. close(code: int | None = None, reason: str | None = None) → None Closes the websocket0 码力 | 272 页 | 1.12 MB | 2 月前3Tornado 6.5 Documentation
WebSocketHandler.ping() WebSocketHandler.on_pong() WebSocketClosedError Client-side support websocket_connect() WebSocketClientConnection WebSocketClientConnection.close() WebSocketClientConnection.write_message() on a closed connection. Added in version 3.2. Client-side support tornado.websocket.websocket_connect(url: str [https://docs.python.org/3/library/stdtypes.html#str] | HTTPRequest, callback: Callable org/3/library/constants.html#None]] | None [https://docs.python.org/3/library/constants.html#None] = None, connect_timeout: float[https://docs.python.org/3/library/functions.html#float] | None [https://docs.python0 码力 | 437 页 | 405.14 KB | 2 月前3
共 2 条
- 1
相关搜索词