websocket for python

https://github.com/aaugustin/websocketsserver.py#!/usr/bin/env pythonimport asyncioimport websocketsasync def send(websocket, path):    while True:        if not websocket.open:            return        name = await websocket.recv()        await websocket.send("{}".format(name))        print("{}".format("{}".format(name)))start_server = websockets.serve(send, '192.168.2.150', 8765)asyncio.get_event_loop().run_until_complete(start_server)asyncio.get_event_loop().run_forever()

虽然作品没有成功,但也不敢隐藏私密,这里记载的所有侠客化身,竟然成为大师,著名的向日葵宝典,为了给后人提供晚餐。

[En]

Although the work did not succeed, but also did not dare to hide private, all the chivalrous avatars recorded here, unexpectedly become a master, the famous sunflower treasure book, in order to provide dinner for later generations.

邮箱:steven9801@163.com
QQ: 48039387

Original: https://www.cnblogs.com/fx2008/p/6183303.html
Author: 火腿骑士
Title: websocket for python

原创文章受到原创版权保护。转载请注明出处:https://www.johngo689.com/7497/

转载文章受原作者版权保护。转载请注明原作者出处!

(0)

大家都在看

免费咨询
免费咨询
扫码关注
扫码关注
联系站长

站长Johngo!

大数据和算法重度研究者!

持续产出大数据、算法、LeetCode干货,以及业界好资源!

2022012703491714

微信来撩,免费咨询:xiaozhu_tec

分享本页
返回顶部
最近整理资源【免费获取】:   👉 程序员最新必读书单  | 👏 互联网各方向面试题下载 | ✌️计算机核心资源汇总