摘要: 通过 getattr(socket, '_closed') 的返回值可以判断服务端的运行状态。 True 是关闭状态,False 是运行中。 import socket ip = 'localhost' port = 5003 ws = socket.socket(socket.AF_INET, s 阅读全文
posted @ 2022-06-02 16:12 十点 阅读(984) 评论(0) 推荐(0) 编辑