mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:17:45 +00:00
Kernel+LibC: Implement the socketpair() syscall
This commit is contained in:
parent
c841012f56
commit
aa792062cb
11 changed files with 100 additions and 91 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue