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.
This commit is contained in:
Sergey Bugaev 2019-08-10 18:55:54 +03:00 committed by Andreas Kling
commit a30930465e
Notes: sideshowbarker 2024-07-19 12:44:42 +09:00
2 changed files with 8 additions and 0 deletions

View file

@ -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;