from websocket import create_connection
ws = create_connection("wss://ws.xxxxxxx.info/inv")
ws.send(str({"op":"unconfirmed_sub"}))
print("Receiving...")
result = ws.recv()
print(str(result))
python如何做长连接 python建立长连接
转载文章标签 python如何做长连接 文章分类 Python 后端开发
本文章为转载内容,我们尊重原作者对文章享有的著作权。如有内容错误或侵权问题,欢迎原作者联系我们进行内容更正或删除文章。
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
TCP如何建立长连接
如果不主动关闭socket,操作系统是不会将其关闭的,这样socket所在的进程如果没有挂掉,则socket所占用的资源将一直无法回
tcp/ip 网络 服务器 #include 客户端