1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 03:17:35 +00:00

LibCore+LibIPC: Move SystemServerTakeover.{h,cpp} to LibCore

This functionality is required by Core::LocalServer and LibIPC depends
on LibCore.

take_over_accepted_socket_from_system_server has also been renamed to
take_over_socket_from_system_server as the socket need not be accepted
before taking it over. :^)
This commit is contained in:
sin-ack 2022-01-15 11:56:48 +00:00 committed by Andreas Kling
parent 032ffbcf64
commit 89d9a1afc0
6 changed files with 24 additions and 17 deletions

View file

@ -7,15 +7,15 @@
#pragma once
#include <LibCore/System.h>
#include <LibCore/SystemServerTakeover.h>
#include <LibIPC/ClientConnection.h>
#include <LibIPC/SystemServerTakeover.h>
namespace IPC {
template<typename ClientConnectionType>
ErrorOr<NonnullRefPtr<ClientConnectionType>> take_over_accepted_client_from_system_server()
{
auto socket = TRY(take_over_accepted_socket_from_system_server());
auto socket = TRY(Core::take_over_socket_from_system_server());
return IPC::new_client_connection<ClientConnectionType>(move(socket));
}