mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 22:22:45 +00:00 
			
		
		
		
	 89d9a1afc0
			
		
	
	
		89d9a1afc0
		
	
	
	
	
		
			
			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. :^)
		
			
				
	
	
		
			22 lines
		
	
	
	
		
			533 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
	
		
			533 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| /*
 | |
|  * Copyright (c) 2021, Andreas Kling <kling@serenityos.org>
 | |
|  *
 | |
|  * SPDX-License-Identifier: BSD-2-Clause
 | |
|  */
 | |
| 
 | |
| #pragma once
 | |
| 
 | |
| #include <LibCore/System.h>
 | |
| #include <LibCore/SystemServerTakeover.h>
 | |
| #include <LibIPC/ClientConnection.h>
 | |
| 
 | |
| namespace IPC {
 | |
| 
 | |
| template<typename ClientConnectionType>
 | |
| ErrorOr<NonnullRefPtr<ClientConnectionType>> take_over_accepted_client_from_system_server()
 | |
| {
 | |
|     auto socket = TRY(Core::take_over_socket_from_system_server());
 | |
|     return IPC::new_client_connection<ClientConnectionType>(move(socket));
 | |
| }
 | |
| 
 | |
| }
 |