procslink.py 文件源码

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

项目:procslink 作者: vfreex 项目源码 文件源码
def to_bytes(self):
        # TODO: This is a WORKAROUND!
        # Before Python 2.7.7, struct.pack() only accepts native str.
        # Uses of unicode will cause TypeError: Struct() argument 1 must be string, not unicode.
        # This have been fixed by the Python community:
        # https://hg.python.org/cpython/raw-file/f89216059edf/Misc/NEWS
        return struct.pack(text_to_native_str(self.FORMAT), self.version, self.flag, self.length,
                           self.payload_type, self.reserved, self.seq, self.timestamp)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号