summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/sockets/sockets.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hle/service/sockets/sockets.cpp')
-rw-r--r--src/core/hle/service/sockets/sockets.cpp19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/core/hle/service/sockets/sockets.cpp b/src/core/hle/service/sockets/sockets.cpp
index b191b5cf5..676d24e03 100644
--- a/src/core/hle/service/sockets/sockets.cpp
+++ b/src/core/hle/service/sockets/sockets.cpp
@@ -1,6 +1,7 @@
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
+#include "core/hle/service/server_manager.h"
#include "core/hle/service/sockets/bsd.h"
#include "core/hle/service/sockets/nsd.h"
#include "core/hle/service/sockets/sfdnsres.h"
@@ -8,15 +9,17 @@
namespace Service::Sockets {
-void InstallInterfaces(SM::ServiceManager& service_manager, Core::System& system) {
- std::make_shared<BSD>(system, "bsd:s")->InstallAsService(service_manager);
- std::make_shared<BSD>(system, "bsd:u")->InstallAsService(service_manager);
- std::make_shared<BSDCFG>(system)->InstallAsService(service_manager);
+void LoopProcess(Core::System& system) {
+ auto server_manager = std::make_unique<ServerManager>(system);
- std::make_shared<NSD>(system, "nsd:a")->InstallAsService(service_manager);
- std::make_shared<NSD>(system, "nsd:u")->InstallAsService(service_manager);
-
- std::make_shared<SFDNSRES>(system)->InstallAsService(service_manager);
+ server_manager->RegisterNamedService("bsd:s", std::make_shared<BSD>(system, "bsd:s"));
+ server_manager->RegisterNamedService("bsd:u", std::make_shared<BSD>(system, "bsd:u"));
+ server_manager->RegisterNamedService("bsdcfg", std::make_shared<BSDCFG>(system));
+ server_manager->RegisterNamedService("nsd:a", std::make_shared<NSD>(system, "nsd:a"));
+ server_manager->RegisterNamedService("nsd:u", std::make_shared<NSD>(system, "nsd:u"));
+ server_manager->RegisterNamedService("sfdnsres", std::make_shared<SFDNSRES>(system));
+ server_manager->StartAdditionalHostThreads("bsdsocket", 2);
+ ServerManager::RunServer(std::move(server_manager));
}
} // namespace Service::Sockets