mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-05 16:14:38 +00:00
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.
19 lines
338 B
C++
19 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();
|
|
};
|