summaryrefslogtreecommitdiff
path: root/Lagom
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-09-21 10:46:55 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-09-21 15:25:08 +0200
commit953cb4e43621a62272620bcc24bab2b036f25c49 (patch)
treef067c4996ba60152e2ede7f52e081b532fecb481 /Lagom
parentc83da29a9d332236ea67ac88f5ab5839657f958f (diff)
downloadserenity-953cb4e43621a62272620bcc24bab2b036f25c49.zip
LibCore: Convert CLocalServer to ObjectPtr
Diffstat (limited to 'Lagom')
-rw-r--r--Lagom/SimpleIPCServer.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lagom/SimpleIPCServer.cpp b/Lagom/SimpleIPCServer.cpp
index 3d4b5b69f1..290c95300c 100644
--- a/Lagom/SimpleIPCServer.cpp
+++ b/Lagom/SimpleIPCServer.cpp
@@ -27,10 +27,10 @@ int main(int, char**)
CEventLoop event_loop;
unlink("/tmp/simple-ipc");
- CLocalServer server_sock;
- server_sock.listen("/tmp/simple-ipc");
- server_sock.on_ready_to_accept = [&] {
- auto* client_socket = server_sock.accept();
+ auto server = CLocalServer::construct();
+ server->listen("/tmp/simple-ipc");
+ server->on_ready_to_accept = [&] {
+ auto client_socket = server->accept();
ASSERT(client_socket);
static int next_client_id = 0;
IPC::Server::new_connection_ng_for_client<SimpleIPCServer>(*client_socket, ++next_client_id);