summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibCore/LocalServer.h
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-11-29 18:42:01 +0100
committerAndreas Kling <kling@serenityos.org>2021-11-30 23:34:40 +0100
commitfe003939413d0de648618e2cd5f5c72182c7cf7b (patch)
treee75b7e24ca4df39d07a4cc23af30a47ee87bd9c3 /Userland/Libraries/LibCore/LocalServer.h
parent6cb3092b42132ab8ff59158e0b418a818c7ec315 (diff)
downloadserenity-fe003939413d0de648618e2cd5f5c72182c7cf7b.zip
LibCore: Change Core::LocalServer::on_ready_to_accept => on_accept
Everyone used this hook in the same way: immediately accept() on the socket and then do something with the newly accepted fd. This patch simplifies the hook by having LocalServer do the accepting automatically.
Diffstat (limited to 'Userland/Libraries/LibCore/LocalServer.h')
-rw-r--r--Userland/Libraries/LibCore/LocalServer.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/Userland/Libraries/LibCore/LocalServer.h b/Userland/Libraries/LibCore/LocalServer.h
index 24382fa979..7974d3aa28 100644
--- a/Userland/Libraries/LibCore/LocalServer.h
+++ b/Userland/Libraries/LibCore/LocalServer.h
@@ -22,6 +22,7 @@ public:
RefPtr<LocalSocket> accept();
+ Function<void(NonnullRefPtr<Core::LocalSocket>)> on_accept;
Function<void()> on_ready_to_accept;
private: