一品网
  • 首页

【websockets】python使用websockets库调用websocket接口


class WsClient(object):
    def __init__(self, url):
        self.url = url

    async def test(self):
        async with websockets.connect(self.url + '/test') as websocket:
            await websocket.send('{"chan": "test"}')
            while True:
                recv_text = await websocket.recv()
                debug_logger.info(recv_text)

    def run_test(self):
        asyncio.get_event_loop().run_until_complete(self.test())
Python-BasictoolsPython库websockets

相关


[Tools] 多媒体视频处理工具FFmpeg

pyqt5-tools安装后 desinner.exe 报错 PyQt5 the application failed to start beca

Mac 安装 Android commandlinetools 各种报错的问题

vmtools安装

【Tools】SSHUsage

VS 2019编辑含有资源文件.resx的项目时提示MSB3086 任务未能使用 SdkToolsPath 或注册

VS 2019编辑含有资源文件.resx的项目时提示MSB3086 任务未能使用 SdkToolsPath 或注册

Python库整理

运行re-sign.jar重签名工具报错ERROR:Cannot run program "D:\sdk\tools\zipalign

15个你不得不知道的Chrome dev tools的小技巧

我的Vue 环境配置(vue-devtools安装过程)

itertools学习

标签

一品网 冀ICP备14022925号-6