geventclient.py 文件源码

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

项目:arduino-ciao-meteor-ddp-connector 作者: andrea689 项目源码 文件源码
def receive(self):
        """
        Returns messages that were stored into the
        `messages` queue and returns `None` when the
        websocket is terminated or closed.
        """
        # If the websocket was terminated and there are no messages
        # left in the queue, return None immediately otherwise the client
        # will block forever
        if self.terminated and self.messages.empty():
            return None
        message = self.messages.get()
        if message is StopIteration:
            return None
        return message
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号