SSX3LobbyServer/lib/aries/Message.hpp

22 lines
598 B
C++
Raw Normal View History

#pragma once
#include <base/network_order.hpp>
#include <base/fourcc.hpp>
namespace ls::aries {
/// The Aries message header.
struct [[gnu::packed]] AriesMessageHeader {
/// Message FourCC.
base::FourCC32_t typeCode {};
/// Apparently a extra 4 bytes of FourCC?
base::FourCC32_t typeCodeHi {};
/// The size of the message payload. Is network order (big endian), and includes the size of this header
base::NetworkOrder<u32> messageSize {};
};
// Sanity checking.
static_assert(sizeof(AriesMessageHeader) == 12, "Aries message header size is invalid");
} // namespace ls::proto