1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 17:28:11 +00:00

Kernel: Store LocalSocket address as a KString internally

Just because we deal with sockaddr_un at the userspace API layer doesn't
mean we have to store an awkward C type internally. :^)
This commit is contained in:
Andreas Kling 2021-08-29 01:59:34 +02:00
parent fa4eeca0ac
commit 70b2225b3d
2 changed files with 47 additions and 21 deletions

View file

@ -69,6 +69,8 @@ private:
evaluate_block_conditions();
}
KResult try_set_path(StringView);
// An open socket file on the filesystem.
RefPtr<FileDescription> m_file;
@ -92,7 +94,7 @@ private:
bool m_bound { false };
bool m_accept_side_fd_open { false };
sockaddr_un m_address { 0, { 0 } };
OwnPtr<KString> m_path;
NonnullOwnPtr<DoubleBuffer> m_for_client;
NonnullOwnPtr<DoubleBuffer> m_for_server;