LibIPC: Allow creating MultiServer from an already existing LocalServer

This commit is contained in:
Andrew Kaster
2024-04-26 15:16:52 -06:00
committed by Tim Flynn
parent f8362c8abf
commit 4db0ec86c0

View File

@@ -23,6 +23,11 @@ public:
return adopt_nonnull_own_or_enomem(new (nothrow) MultiServer(move(server)));
}
static ErrorOr<NonnullOwnPtr<MultiServer>> try_create(NonnullRefPtr<Core::LocalServer> server)
{
return adopt_nonnull_own_or_enomem(new (nothrow) MultiServer(move(server)));
}
Function<void(ConnectionFromClientType&)> on_new_client;
private: