sources.py 文件源码

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

项目:logdevourer 作者: Korbank 项目源码 文件源码
def try_readlines(self):
        try:
            while True:
                msg = self.socket.recv(4096, socket.MSG_DONTWAIT)
                yield msg.rstrip("\n")
        except socket.error, e:
            if e.errno == errno.EWOULDBLOCK or e.errno == errno.EAGAIN:
                # this is expected when there's nothing in the socket queue
                return
            else:
                raise # other error, rethrow
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号