ladybird/Libraries/LibIPC/IMessage.h
Andreas Kling ef658594e4 LibIPC: Let's start building custom message codecs for LibIPC
Instead of using ByteBuffer (which always malloc() their storage) for
IPC message encoding, we now use a Vector<u8, 1024>, which means that
messages smaller than 1 KB avoid heap allocation entirely.
2019-12-30 02:41:45 +01:00

18 lines
338 B
C++

#pragma once
#include <AK/String.h>
typedef Vector<u8, 1024> IMessageBuffer;
class IMessage {
public:
virtual ~IMessage();
virtual int endpoint_magic() const = 0;
virtual int message_id() const = 0;
virtual String message_name() const = 0;
virtual IMessageBuffer encode() const = 0;
protected:
IMessage();
};