rfc2217.py 文件源码

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

项目:microbit-serial 作者: martinohanlon 项目源码 文件源码
def escape(self, data):
        """\
        This generator function is for the user. All outgoing data has to be
        properly escaped, so that no IAC character in the data stream messes up
        the Telnet state machine in the server.

        socket.sendall(escape(data))
        """
        for byte in iterbytes(data):
            if byte == IAC:
                yield IAC
                yield IAC
            else:
                yield byte

    # - incoming data filter
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号