LibCore: Expose UDPServer::fd() and make the constructor protected

This commit is contained in:
Sergey Bugaev 2021-02-14 17:10:00 +03:00 committed by Andreas Kling
commit bc05ab47de
Notes: sideshowbarker 2024-07-18 22:16:33 +09:00

View file

@ -53,11 +53,14 @@ public:
Optional<IPv4Address> local_address() const;
Optional<u16> local_port() const;
int fd() const { return m_fd; }
Function<void()> on_ready_to_receive;
private:
protected:
explicit UDPServer(Object* parent = nullptr);
private:
int m_fd { -1 };
bool m_bound { false };
RefPtr<Notifier> m_notifier;