1 Star 0 Fork 0

swmore/pdfjspc

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
ws.py~ 438 Bytes
一键复制 编辑 原始数据 按行查看 历史
swmore 提交于 2020-09-22 17:03 . initial commit
#!/usr/bin/env python
import asyncio
import websockets
async def echo(websocket, path):
master = False
if message == "master":
master = True
async for message in websocket:
print(message)
if not master:
await websocket.send(message)
start_server = websockets.serve(echo, "localhost", 8765)
asyncio.get_event_loop().run_until_complete(start_server)
asyncio.get_event_loop().run_forever()
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/swmore/pdfjspc.git
git@gitee.com:swmore/pdfjspc.git
swmore
pdfjspc
pdfjspc
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385