diff options
author | Sergey Bugaev <bugaevc@gmail.com> | 2019-08-10 18:55:54 +0300 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-08-11 16:30:43 +0200 |
commit | a30930465eec3e8c1b5aa1ce5eefc2511846beda (patch) | |
tree | f830470b4ab25b9637a4f9551d79f3b0bca1de86 /Kernel/Net/LocalSocket.h | |
parent | 8a975ff6302e4e7488da3dfb23519faedccc59c3 (diff) | |
download | serenity-a30930465eec3e8c1b5aa1ce5eefc2511846beda.zip |
Net: Add LocalSocket::socket_path()
This is a little utility function to safely extract the path without
manually dealing with sun_path and null-termination.
Diffstat (limited to 'Kernel/Net/LocalSocket.h')
-rw-r--r-- | Kernel/Net/LocalSocket.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Kernel/Net/LocalSocket.h b/Kernel/Net/LocalSocket.h index b764a6a117..84c470173d 100644 --- a/Kernel/Net/LocalSocket.h +++ b/Kernel/Net/LocalSocket.h @@ -10,6 +10,8 @@ public: static NonnullRefPtr<LocalSocket> create(int type); virtual ~LocalSocket() override; + + StringView socket_path() const; // ^Socket virtual KResult bind(const sockaddr*, socklen_t) override; virtual KResult connect(FileDescription&, const sockaddr*, socklen_t, ShouldBlock = ShouldBlock::Yes) override; |