diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-09-22 21:30:30 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-09-22 21:30:30 +0200 |
commit | 65409e8f04b0cdbc7df76d4e6edb4265ad5ded9c (patch) | |
tree | 650f2e5efd79efd5d2900f5dc3d292a23a67edc5 /Kernel/Net/LocalSocket.h | |
parent | 34d0e96aec89ea643cd5eb3e279a46a7542aac64 (diff) | |
download | serenity-65409e8f04b0cdbc7df76d4e6edb4265ad5ded9c.zip |
LocalSocket: Teach recvfrom() how to block if needed, and simplify it
If we can't already read when we enter recvfrom() on a LocalSocket,
we'll now block the current thread until we can.
Also added a buffer_for(FileDescription&) helper so that the client
and server can share some of the code. :^)
Diffstat (limited to 'Kernel/Net/LocalSocket.h')
-rw-r--r-- | Kernel/Net/LocalSocket.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Kernel/Net/LocalSocket.h b/Kernel/Net/LocalSocket.h index 5ce1753653..2a6ee5bd2b 100644 --- a/Kernel/Net/LocalSocket.h +++ b/Kernel/Net/LocalSocket.h @@ -36,6 +36,7 @@ private: virtual bool is_local() const override { return true; } bool has_attached_peer(const FileDescription&) const; static Lockable<InlineLinkedList<LocalSocket>>& all_sockets(); + DoubleBuffer& buffer_for(FileDescription&); // An open socket file on the filesystem. RefPtr<FileDescription> m_file; |