diff options
author | Gunnar Beutner <gbeutner@serenityos.org> | 2021-04-28 12:39:12 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-04-28 14:19:45 +0200 |
commit | aa792062cbb0d39092948a7e71fad59737c4ac66 (patch) | |
tree | 09ff716195ccdaa7771f7188d2c9c77fd2183946 /Kernel/Net/LocalSocket.h | |
parent | c841012f569dba4fa72e9eb8989bb847be4535bc (diff) | |
download | serenity-aa792062cbb0d39092948a7e71fad59737c4ac66.zip |
Kernel+LibC: Implement the socketpair() syscall
Diffstat (limited to 'Kernel/Net/LocalSocket.h')
-rw-r--r-- | Kernel/Net/LocalSocket.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Kernel/Net/LocalSocket.h b/Kernel/Net/LocalSocket.h index 362cc42cf1..54412c829f 100644 --- a/Kernel/Net/LocalSocket.h +++ b/Kernel/Net/LocalSocket.h @@ -14,12 +14,18 @@ namespace Kernel { class FileDescription; +struct SocketPair { + NonnullRefPtr<FileDescription> description1; + NonnullRefPtr<FileDescription> description2; +}; + class LocalSocket final : public Socket , public InlineLinkedListNode<LocalSocket> { friend class InlineLinkedListNode<LocalSocket>; public: static KResultOr<NonnullRefPtr<Socket>> create(int type); + static KResultOr<SocketPair> create_connected_pair(int type); virtual ~LocalSocket() override; KResult sendfd(const FileDescription& socket_description, FileDescription& passing_description); |