mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 12:19:54 +00:00
LibIPC: Add some type aliases and MessageBuffer helpers
To re-use some of these wordy types outside of LibIPC, let's add some aliases.
This commit is contained in:
parent
8dd259b8d8
commit
fd6d868ae2
Notes:
github-actions[bot]
2025-07-18 14:11:24 +00:00
Author: https://github.com/trflynn89
Commit: fd6d868ae2
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5492
Reviewed-by: https://github.com/ADKaster
Reviewed-by: https://github.com/shannonbooth
4 changed files with 30 additions and 5 deletions
|
@ -35,6 +35,13 @@ ErrorOr<void> MessageBuffer::append_file_descriptor(int fd)
|
|||
return {};
|
||||
}
|
||||
|
||||
ErrorOr<void> MessageBuffer::extend(MessageBuffer&& buffer)
|
||||
{
|
||||
TRY(m_data.try_extend(move(buffer.m_data)));
|
||||
TRY(m_fds.try_extend(move(buffer.m_fds)));
|
||||
return {};
|
||||
}
|
||||
|
||||
ErrorOr<void> MessageBuffer::transfer_message(Transport& transport)
|
||||
{
|
||||
Checked<MessageSizeType> checked_message_size { m_data.size() };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue