summaryrefslogtreecommitdiff
path: root/Kernel/Net/LocalSocket.h
diff options
context:
space:
mode:
authorGunnar Beutner <gbeutner@serenityos.org>2021-04-28 12:39:12 +0200
committerAndreas Kling <kling@serenityos.org>2021-04-28 14:19:45 +0200
commitaa792062cbb0d39092948a7e71fad59737c4ac66 (patch)
tree09ff716195ccdaa7771f7188d2c9c77fd2183946 /Kernel/Net/LocalSocket.h
parentc841012f569dba4fa72e9eb8989bb847be4535bc (diff)
downloadserenity-aa792062cbb0d39092948a7e71fad59737c4ac66.zip
Kernel+LibC: Implement the socketpair() syscall
Diffstat (limited to 'Kernel/Net/LocalSocket.h')
-rw-r--r--Kernel/Net/LocalSocket.h6
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);