websockets Documentation
Release 3.2python import asyncio import websockets async def hello(websocket, path): name = await websocket.recv() print("{}".format(name)) greeting = "Hello {}!".format(name) await websocket websocket.send(name) print"> {}".format(name)) greeting = await websocket.recv() print">{}".format(greeting)) asyncio.get_event_loop().run_until_complete(hello()) websocket.send(name) print("> {}".format(name)) greeting = yield from websocket.recv() print("< {}".format(greeting)) finally: yield from websocket.close() asyncio0 码力 | 32 页 | 170.46 KB | 2 年前3
websockets Documentation
Release 3.3python import asyncio import websockets async def hello(websocket, path): name = await websocket.recv() print("{}".format(name)) greeting = "Hello {}!".format(name) await websocket await websocket.send(name) print("> {}.format(name)) greeting = await websocket.recv() print("< {}.format(greeting)) asyncio.get_event_loop().run_until_complete(hello()) async from websocket.send(name) print("> {}.format(name)) greeting = yield from websocket.recv() print("< {}.format(greeting)) finally: yield from websocket.close() asyncio.get_event_loop()0 码力 | 32 页 | 176.18 KB | 2 年前3
Session Types in C++queue T recv() { ... } }; Comm(Q1, Q2); // One end-point Comm(Q2, Q1); // The other end-point Two channels/queues void serverFunc(Comm chan) { auto v1 = chan.recv(); auto v2 = chan.recv void serverFunc(Comm chan) { auto v1 = chan.recv(); chan.send(v1 + v2); chan.close(); }  void clientFunc(Comm chan) { cout << auto r = chan.recv (); cout << "Result: " << r << endl; chan.close(); } (); auto 0 码力 | 89 页 | 1.55 MB | 1 年前3
websockets Documentation
Release 9.0connect(uri) as websocket: await websocket.send("Hello world!") await websocket.recv() asyncio.get_event_loop().run_until_complete(hello()) And here’s an echo server: #!/usr/bin/env example import asyncio import websockets async def hello(websocket, path): name = await websocket.recv() print(f "recv() print(f "< greeting ") asyncio.get_event_loop().run_until_complete(hello()) 0 码力 | 81 页 | 352.88 KB | 2 年前3
gevent-socketio Documentation
Release 0.3.1attribute) recv_json(). (socketio.namespace.BaseNamespace method) |RE HANDSHAKE URL(socketio.handler.SocketIOHandler attribute)RE REQUEST URL(socketio.handler.SocketIOHandler attribute)recv connect() (socketio (socketio.namespace.BaseNamespace method)recv disconnect() (socketio.namespace.BaseNamespace method)recv error() (socketio.namespace.BaseNamespace method)| |---| ## S |send()\_(socketio.namespace.BaseNamespace """ACL system: This removes restrictions on the namespace's methods, so that all the `on_*()` and `recv_*()` can be accessed. self.allowed_methods = None [docs]. def get_initial_acl(self): """ACL0 码力 | 91 页 | 118.05 KB | 2 年前3
websockets Documentation
Release 5.0example import asyncio import websockets async def hello(websocket, path): name = await websocket.recv() print(f "recv() print(f "< greeting") asyncio.get_event_loop().run_until_complete(hello()) pathlib import ssl import websockets async def hello(websocket, path): name = await websocket.recv() print(f "< name> ") greeting = f"Hello {name}!" await websocket 0 码力 | 56 页 | 245.43 KB | 2 年前3
websockets Documentation
Release 6.0example import asyncio import websockets async def hello(websocket, path): name = await websocket.recv() print(f "recv() print(f "< greeting") asyncio.get_event_loop().run_until_complete(hello()) pathlib import ssl import websockets async def hello(websocket, path): name = await websocket.recv() print(f "< name> ") greeting = f"Hello {name}!" await websocket 0 码力 | 58 页 | 253.08 KB | 2 年前3
websockets Documentation
Release 4.0python import asyncio import websockets async def hello(websocket, path): name = await websocket.recv() print("{}".format(name)) greeting = "Hello {}!".format(name) await websocket await websocket.send(name) print("> {}.format(name)) greeting = await websocket.recv() print("< {}.format(greeting)) asyncio.get_event_loop().run_until_complete(hello()) websocket.send(name) print("> {}".format(name)) greeting = yield from websocket.recv() print("< {}".format(greeting)) finally: yield from websocket.close() asyncio0 码力 | 48 页 | 224.70 KB | 2 年前3
websockets Documentation
Release 3.4python import asyncio import websockets async def hello(websocket, path): name = await websocket.recv() print("{}".format(name)) greeting = "Hello {}!".format(name) await websocket await websocket.send(name) print("> {}.format(name)) greeting = await websocket.recv() print("< {}.format(greeting)) asyncio.get_event_loop().run_until_complete(hello()) websocket.send(name) print("> {}".format(name)) greeting = yield from websocket.recv() print("< {}".format(greeting)) finally: yield from websocket.close() asyncio0 码力 | 36 页 | 192.66 KB | 2 年前3
websockets Documentation
Release 2.7asyncio import websockets @asyncio.coroutine def hello(WebSocket, path): name = yield from websocket.recv() print("{}".format(name)) greeting = "Hello {}!".format(name) yield from from websocket.send(name) print("> {}".format(name)) greeting = yield from websocket.recv() print("{}".format(greeting)) yield from websocket.close() asyncio.get_event_loop().ru while True: message = yield from websocket.recv() if message is None: break yield from consumer(message) recv() returns None when the connection is closed. In other0 码力 | 28 页 | 157.50 KB | 2 年前3
共 854 条
- 1
- 2
- 3
- 4
- 5
- 6
- 86
相关搜索词
websocketsWebSocketasyncioRFC 6455recv()recv() API服务器客户端超时Session TypesC++Binary Session TypesProtocolInteractionAPI兼容性策略WebSocket协议版本9.0gevent-socketioSocket.IONamespaceTransportversionsecurity issuecompatibilitycontributing guideHeaders类HTTP协议异步编程扩展版本4.0压缩协议状态异步迭代器signal handlingdeploymenttimeout handlingTLS/SSL













