mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-23 17:52:26 -05:00
ef658594e4
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.
18 lines
338 B
C++
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();
|
|
};
|