process.py 文件源码

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

项目:incubator-ariatosca 作者: apache 项目源码 文件源码
def _send_message(connection, message):

    # Packing the length of the entire msg using struct.pack.
    # This enables later reading of the content.
    def _pack(data):
        return struct.pack(_INT_FMT, len(data))

    data = jsonpickle.dumps(message)
    msg_metadata = _pack(data)
    connection.send(msg_metadata)
    connection.sendall(data)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号