connections.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:slugiot-client 作者: slugiot 项目源码 文件源码
def close(self):
        ''' Send the quit message and close the socket '''
        if self.socket is None:
            raise Error("Already closed")
        send_data = struct.pack('<i',1) + int2byte(COM_QUIT)
        self.wfile.write(send_data)
        self.wfile.close()
        self.rfile.close()
        self.socket.close()
        self.socket = None
        self.rfile = None
        self.wfile = None
评论列表


问题


面经


文章

微信
公众号

扫码关注公众号