From bc05ab47de561f267e4df902a9bd869f8979b019 Mon Sep 17 00:00:00 2001 From: Sergey Bugaev Date: Sun, 14 Feb 2021 17:10:00 +0300 Subject: [PATCH] LibCore: Expose UDPServer::fd() and make the constructor protected --- Userland/Libraries/LibCore/UDPServer.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Userland/Libraries/LibCore/UDPServer.h b/Userland/Libraries/LibCore/UDPServer.h index 29dfd29d60..e22f0efa83 100644 --- a/Userland/Libraries/LibCore/UDPServer.h +++ b/Userland/Libraries/LibCore/UDPServer.h @@ -53,11 +53,14 @@ public: Optional local_address() const; Optional local_port() const; + int fd() const { return m_fd; } + Function on_ready_to_receive; -private: +protected: explicit UDPServer(Object* parent = nullptr); +private: int m_fd { -1 }; bool m_bound { false }; RefPtr m_notifier;