mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 22:27:35 +00:00
LibCore: Convert CTCPServer to ObjectPtr
Also get rid of the custom CNotifier::create() in favor of construct().
This commit is contained in:
parent
bce58bbbca
commit
4ea229accd
12 changed files with 23 additions and 27 deletions
|
@ -9,7 +9,6 @@ class CTCPSocket;
|
|||
class CTCPServer : public CObject {
|
||||
C_OBJECT(CTCPServer)
|
||||
public:
|
||||
explicit CTCPServer(CObject* parent = nullptr);
|
||||
virtual ~CTCPServer() override;
|
||||
|
||||
bool is_listening() const { return m_listening; }
|
||||
|
@ -20,7 +19,9 @@ public:
|
|||
Function<void()> on_ready_to_accept;
|
||||
|
||||
private:
|
||||
explicit CTCPServer(CObject* parent = nullptr);
|
||||
|
||||
int m_fd { -1 };
|
||||
bool m_listening { false };
|
||||
OwnPtr<CNotifier> m_notifier;
|
||||
ObjectPtr<CNotifier> m_notifier;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue