backend.py 文件源码

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

项目:aetros-cli 作者: aetros 项目源码 文件源码
def send_message(self, message):
        """
        Internal. Sends the actual message from a queue entry.
        """
        if not self.connected:
            return False

        message['_sending'] = True

        msg = msgpack.packb(message, default=invalid_json_values)

        try:
            self.ssh_stream_stdin.write(msg)
            message['_sent'] = True
            self.ssh_stream_stdin.flush()

            return len(msg)
        except KeyboardInterrupt:

            if message['_sent']:
                return len(msg)

            return False

        except Exception as error:
            self.connection_error(error)
            return False
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号