ladybird/Userland/Libraries/LibIPC/Forward.h
Timothy Flynn 34160743dc LibIPC: Avoid redundant copy of every tranferred IPC message
For every IPC message sent, we currently prepend the message size to the
IPC message buffer. This incurs the cost of copying the entire message
to its newly allocated position. Instead, reserve the bytes for the size
at the front of the buffer upon creation. Prevent dangerous access to
the buffer with specific public methods.
2024-01-03 10:17:00 +01:00

27 lines
374 B
C++

/*
* Copyright (c) 2020, Andreas Kling <kling@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <AK/Error.h>
namespace IPC {
class Decoder;
class Encoder;
class Message;
class MessageBuffer;
class File;
class Stub;
template<typename T>
ErrorOr<void> encode(Encoder&, T const&);
template<typename T>
ErrorOr<T> decode(Decoder&);
}