def _recv_message(connection):
# Retrieving the length of the msg to come.
def _unpack(conn):
return struct.unpack(_INT_FMT, _recv_bytes(conn, _INT_SIZE))[0]
msg_metadata_len = _unpack(connection)
msg = _recv_bytes(connection, msg_metadata_len)
return jsonpickle.loads(msg)
评论列表
文章目录