robot.py 文件源码

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

项目:networkzero 作者: tjguk 项目源码 文件源码
def get_command(self):
        """Attempt to return a unicode object from the command socket

        If no message is available without blocking (as opposed to a blank 
        message), return None
        """
        try:
            message_bytes = self.socket.recv(zmq.NOBLOCK)
            log.debug("Received message: %r", message_bytes)
        except zmq.ZMQError as exc:
            if exc.errno == zmq.EAGAIN:
                return None
            else:
                raise
        else:
            return message_bytes.decode(config.CODEC)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号