aboutsummaryrefslogtreecommitdiff
path: root/src/Message.cpp
blob: 89973d30a7e0a7c6505a6d609cfdf63f0d30dc5d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include "../include/sibs/Message.hpp"

namespace sibs
{
    Message::Message(MessageType messageType)
    {
        static_assert(sizeof(MessageType) == sizeof(u8), "Whoops, message type size has changed, the below code doesn't work");
        serializer.add((u8)messageType);
    }

     void Message::append(const void *data, const usize size)
     {
         serializer.add((const u8*)data, size);
     }
}