diff options
Diffstat (limited to 'src/core')
| -rw-r--r-- | src/core/CMakeLists.txt | 14 | ||||
| -rw-r--r-- | src/core/announce_multiplayer_session.cpp | 165 | ||||
| -rw-r--r-- | src/core/announce_multiplayer_session.h | 96 | ||||
| -rw-r--r-- | src/core/core.cpp | 17 | ||||
| -rw-r--r-- | src/core/hle/service/nifm/nifm.cpp | 4 | ||||
| -rw-r--r-- | src/core/hle/service/sockets/bsd.cpp | 4 | ||||
| -rw-r--r-- | src/core/hle/service/sockets/bsd.h | 2 | ||||
| -rw-r--r-- | src/core/hle/service/sockets/sockets_translate.cpp | 2 | ||||
| -rw-r--r-- | src/core/hle/service/sockets/sockets_translate.h | 2 | ||||
| -rw-r--r-- | src/core/internal_network/network.cpp (renamed from src/core/network/network.cpp) | 6 | ||||
| -rw-r--r-- | src/core/internal_network/network.h (renamed from src/core/network/network.h) | 0 | ||||
| -rw-r--r-- | src/core/internal_network/network_interface.cpp (renamed from src/core/network/network_interface.cpp) | 2 | ||||
| -rw-r--r-- | src/core/internal_network/network_interface.h (renamed from src/core/network/network_interface.h) | 0 | ||||
| -rw-r--r-- | src/core/internal_network/sockets.h (renamed from src/core/network/sockets.h) | 3 |
14 files changed, 298 insertions, 19 deletions
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 32cc2f392..48f5c1ee0 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt | |||
| @@ -1,4 +1,6 @@ | |||
| 1 | add_library(core STATIC | 1 | add_library(core STATIC |
| 2 | announce_multiplayer_session.cpp | ||
| 3 | announce_multiplayer_session.h | ||
| 2 | arm/arm_interface.h | 4 | arm/arm_interface.h |
| 3 | arm/arm_interface.cpp | 5 | arm/arm_interface.cpp |
| 4 | arm/cpu_interrupt_handler.cpp | 6 | arm/cpu_interrupt_handler.cpp |
| @@ -741,11 +743,11 @@ add_library(core STATIC | |||
| 741 | memory/dmnt_cheat_vm.h | 743 | memory/dmnt_cheat_vm.h |
| 742 | memory.cpp | 744 | memory.cpp |
| 743 | memory.h | 745 | memory.h |
| 744 | network/network.cpp | 746 | internal_network/network.cpp |
| 745 | network/network.h | 747 | internal_network/network.h |
| 746 | network/network_interface.cpp | 748 | internal_network/network_interface.cpp |
| 747 | network/network_interface.h | 749 | internal_network/network_interface.h |
| 748 | network/sockets.h | 750 | internal_network/sockets.h |
| 749 | perf_stats.cpp | 751 | perf_stats.cpp |
| 750 | perf_stats.h | 752 | perf_stats.h |
| 751 | reporter.cpp | 753 | reporter.cpp |
| @@ -780,7 +782,7 @@ endif() | |||
| 780 | 782 | ||
| 781 | create_target_directory_groups(core) | 783 | create_target_directory_groups(core) |
| 782 | 784 | ||
| 783 | target_link_libraries(core PUBLIC common PRIVATE audio_core video_core) | 785 | target_link_libraries(core PUBLIC common PRIVATE audio_core network video_core) |
| 784 | target_link_libraries(core PUBLIC Boost::boost PRIVATE fmt::fmt nlohmann_json::nlohmann_json mbedtls Opus::Opus) | 786 | target_link_libraries(core PUBLIC Boost::boost PRIVATE fmt::fmt nlohmann_json::nlohmann_json mbedtls Opus::Opus) |
| 785 | if (MINGW) | 787 | if (MINGW) |
| 786 | target_link_libraries(core PRIVATE ${MSWSOCK_LIBRARY}) | 788 | target_link_libraries(core PRIVATE ${MSWSOCK_LIBRARY}) |
diff --git a/src/core/announce_multiplayer_session.cpp b/src/core/announce_multiplayer_session.cpp new file mode 100644 index 000000000..a680ad202 --- /dev/null +++ b/src/core/announce_multiplayer_session.cpp | |||
| @@ -0,0 +1,165 @@ | |||
| 1 | // Copyright 2017 Citra Emulator Project | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #include <chrono> | ||
| 6 | #include <future> | ||
| 7 | #include <vector> | ||
| 8 | #include "announce_multiplayer_session.h" | ||
| 9 | #include "common/announce_multiplayer_room.h" | ||
| 10 | #include "common/assert.h" | ||
| 11 | #include "common/settings.h" | ||
| 12 | #include "network/network.h" | ||
| 13 | |||
| 14 | #ifdef ENABLE_WEB_SERVICE | ||
| 15 | #include "web_service/announce_room_json.h" | ||
| 16 | #endif | ||
| 17 | |||
| 18 | namespace Core { | ||
| 19 | |||
| 20 | // Time between room is announced to web_service | ||
| 21 | static constexpr std::chrono::seconds announce_time_interval(15); | ||
| 22 | |||
| 23 | AnnounceMultiplayerSession::AnnounceMultiplayerSession() { | ||
| 24 | #ifdef ENABLE_WEB_SERVICE | ||
| 25 | backend = std::make_unique<WebService::RoomJson>(Settings::values.web_api_url.GetValue(), | ||
| 26 | Settings::values.yuzu_username.GetValue(), | ||
| 27 | Settings::values.yuzu_token.GetValue()); | ||
| 28 | #else | ||
| 29 | backend = std::make_unique<AnnounceMultiplayerRoom::NullBackend>(); | ||
| 30 | #endif | ||
| 31 | } | ||
| 32 | |||
| 33 | WebService::WebResult AnnounceMultiplayerSession::Register() { | ||
| 34 | std::shared_ptr<Network::Room> room = Network::GetRoom().lock(); | ||
| 35 | if (!room) { | ||
| 36 | return WebService::WebResult{WebService::WebResult::Code::LibError, | ||
| 37 | "Network is not initialized"}; | ||
| 38 | } | ||
| 39 | if (room->GetState() != Network::Room::State::Open) { | ||
| 40 | return WebService::WebResult{WebService::WebResult::Code::LibError, "Room is not open"}; | ||
| 41 | } | ||
| 42 | UpdateBackendData(room); | ||
| 43 | WebService::WebResult result = backend->Register(); | ||
| 44 | if (result.result_code != WebService::WebResult::Code::Success) { | ||
| 45 | return result; | ||
| 46 | } | ||
| 47 | LOG_INFO(WebService, "Room has been registered"); | ||
| 48 | room->SetVerifyUID(result.returned_data); | ||
| 49 | registered = true; | ||
| 50 | return WebService::WebResult{WebService::WebResult::Code::Success}; | ||
| 51 | } | ||
| 52 | |||
| 53 | void AnnounceMultiplayerSession::Start() { | ||
| 54 | if (announce_multiplayer_thread) { | ||
| 55 | Stop(); | ||
| 56 | } | ||
| 57 | shutdown_event.Reset(); | ||
| 58 | announce_multiplayer_thread = | ||
| 59 | std::make_unique<std::thread>(&AnnounceMultiplayerSession::AnnounceMultiplayerLoop, this); | ||
| 60 | } | ||
| 61 | |||
| 62 | void AnnounceMultiplayerSession::Stop() { | ||
| 63 | if (announce_multiplayer_thread) { | ||
| 64 | shutdown_event.Set(); | ||
| 65 | announce_multiplayer_thread->join(); | ||
| 66 | announce_multiplayer_thread.reset(); | ||
| 67 | backend->Delete(); | ||
| 68 | registered = false; | ||
| 69 | } | ||
| 70 | } | ||
| 71 | |||
| 72 | AnnounceMultiplayerSession::CallbackHandle AnnounceMultiplayerSession::BindErrorCallback( | ||
| 73 | std::function<void(const WebService::WebResult&)> function) { | ||
| 74 | std::lock_guard lock(callback_mutex); | ||
| 75 | auto handle = std::make_shared<std::function<void(const WebService::WebResult&)>>(function); | ||
| 76 | error_callbacks.insert(handle); | ||
| 77 | return handle; | ||
| 78 | } | ||
| 79 | |||
| 80 | void AnnounceMultiplayerSession::UnbindErrorCallback(CallbackHandle handle) { | ||
| 81 | std::lock_guard lock(callback_mutex); | ||
| 82 | error_callbacks.erase(handle); | ||
| 83 | } | ||
| 84 | |||
| 85 | AnnounceMultiplayerSession::~AnnounceMultiplayerSession() { | ||
| 86 | Stop(); | ||
| 87 | } | ||
| 88 | |||
| 89 | void AnnounceMultiplayerSession::UpdateBackendData(std::shared_ptr<Network::Room> room) { | ||
| 90 | Network::RoomInformation room_information = room->GetRoomInformation(); | ||
| 91 | std::vector<Network::Room::Member> memberlist = room->GetRoomMemberList(); | ||
| 92 | backend->SetRoomInformation( | ||
| 93 | room_information.name, room_information.description, room_information.port, | ||
| 94 | room_information.member_slots, Network::network_version, room->HasPassword(), | ||
| 95 | room_information.preferred_game, room_information.preferred_game_id); | ||
| 96 | backend->ClearPlayers(); | ||
| 97 | for (const auto& member : memberlist) { | ||
| 98 | backend->AddPlayer(member.username, member.nickname, member.avatar_url, member.mac_address, | ||
| 99 | member.game_info.id, member.game_info.name); | ||
| 100 | } | ||
| 101 | } | ||
| 102 | |||
| 103 | void AnnounceMultiplayerSession::AnnounceMultiplayerLoop() { | ||
| 104 | // Invokes all current bound error callbacks. | ||
| 105 | const auto ErrorCallback = [this](WebService::WebResult result) { | ||
| 106 | std::lock_guard<std::mutex> lock(callback_mutex); | ||
| 107 | for (auto callback : error_callbacks) { | ||
| 108 | (*callback)(result); | ||
| 109 | } | ||
| 110 | }; | ||
| 111 | |||
| 112 | if (!registered) { | ||
| 113 | WebService::WebResult result = Register(); | ||
| 114 | if (result.result_code != WebService::WebResult::Code::Success) { | ||
| 115 | ErrorCallback(result); | ||
| 116 | return; | ||
| 117 | } | ||
| 118 | } | ||
| 119 | |||
| 120 | auto update_time = std::chrono::steady_clock::now(); | ||
| 121 | std::future<WebService::WebResult> future; | ||
| 122 | while (!shutdown_event.WaitUntil(update_time)) { | ||
| 123 | update_time += announce_time_interval; | ||
| 124 | std::shared_ptr<Network::Room> room = Network::GetRoom().lock(); | ||
| 125 | if (!room) { | ||
| 126 | break; | ||
| 127 | } | ||
| 128 | if (room->GetState() != Network::Room::State::Open) { | ||
| 129 | break; | ||
| 130 | } | ||
| 131 | UpdateBackendData(room); | ||
| 132 | WebService::WebResult result = backend->Update(); | ||
| 133 | if (result.result_code != WebService::WebResult::Code::Success) { | ||
| 134 | ErrorCallback(result); | ||
| 135 | } | ||
| 136 | if (result.result_string == "404") { | ||
| 137 | registered = false; | ||
| 138 | // Needs to register the room again | ||
| 139 | WebService::WebResult register_result = Register(); | ||
| 140 | if (register_result.result_code != WebService::WebResult::Code::Success) { | ||
| 141 | ErrorCallback(register_result); | ||
| 142 | } | ||
| 143 | } | ||
| 144 | } | ||
| 145 | } | ||
| 146 | |||
| 147 | AnnounceMultiplayerRoom::RoomList AnnounceMultiplayerSession::GetRoomList() { | ||
| 148 | return backend->GetRoomList(); | ||
| 149 | } | ||
| 150 | |||
| 151 | bool AnnounceMultiplayerSession::IsRunning() const { | ||
| 152 | return announce_multiplayer_thread != nullptr; | ||
| 153 | } | ||
| 154 | |||
| 155 | void AnnounceMultiplayerSession::UpdateCredentials() { | ||
| 156 | ASSERT_MSG(!IsRunning(), "Credentials can only be updated when session is not running"); | ||
| 157 | |||
| 158 | #ifdef ENABLE_WEB_SERVICE | ||
| 159 | backend = std::make_unique<WebService::RoomJson>(Settings::values.web_api_url.GetValue(), | ||
| 160 | Settings::values.yuzu_username.GetValue(), | ||
| 161 | Settings::values.yuzu_token.GetValue()); | ||
| 162 | #endif | ||
| 163 | } | ||
| 164 | |||
| 165 | } // namespace Core | ||
diff --git a/src/core/announce_multiplayer_session.h b/src/core/announce_multiplayer_session.h new file mode 100644 index 000000000..2aaf55017 --- /dev/null +++ b/src/core/announce_multiplayer_session.h | |||
| @@ -0,0 +1,96 @@ | |||
| 1 | // Copyright 2017 Citra Emulator Project | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #pragma once | ||
| 6 | |||
| 7 | #include <atomic> | ||
| 8 | #include <functional> | ||
| 9 | #include <memory> | ||
| 10 | #include <mutex> | ||
| 11 | #include <set> | ||
| 12 | #include <thread> | ||
| 13 | #include "common/announce_multiplayer_room.h" | ||
| 14 | #include "common/common_types.h" | ||
| 15 | #include "common/thread.h" | ||
| 16 | |||
| 17 | namespace Network { | ||
| 18 | class Room; | ||
| 19 | } | ||
| 20 | |||
| 21 | namespace Core { | ||
| 22 | |||
| 23 | /** | ||
| 24 | * Instruments AnnounceMultiplayerRoom::Backend. | ||
| 25 | * Creates a thread that regularly updates the room information and submits them | ||
| 26 | * An async get of room information is also possible | ||
| 27 | */ | ||
| 28 | class AnnounceMultiplayerSession { | ||
| 29 | public: | ||
| 30 | using CallbackHandle = std::shared_ptr<std::function<void(const WebService::WebResult&)>>; | ||
| 31 | AnnounceMultiplayerSession(); | ||
| 32 | ~AnnounceMultiplayerSession(); | ||
| 33 | |||
| 34 | /** | ||
| 35 | * Allows to bind a function that will get called if the announce encounters an error | ||
| 36 | * @param function The function that gets called | ||
| 37 | * @return A handle that can be used the unbind the function | ||
| 38 | */ | ||
| 39 | CallbackHandle BindErrorCallback(std::function<void(const WebService::WebResult&)> function); | ||
| 40 | |||
| 41 | /** | ||
| 42 | * Unbind a function from the error callbacks | ||
| 43 | * @param handle The handle for the function that should get unbind | ||
| 44 | */ | ||
| 45 | void UnbindErrorCallback(CallbackHandle handle); | ||
| 46 | |||
| 47 | /** | ||
| 48 | * Registers a room to web services | ||
| 49 | * @return The result of the registration attempt. | ||
| 50 | */ | ||
| 51 | WebService::WebResult Register(); | ||
| 52 | |||
| 53 | /** | ||
| 54 | * Starts the announce of a room to web services | ||
| 55 | */ | ||
| 56 | void Start(); | ||
| 57 | |||
| 58 | /** | ||
| 59 | * Stops the announce to web services | ||
| 60 | */ | ||
| 61 | void Stop(); | ||
| 62 | |||
| 63 | /** | ||
| 64 | * Returns a list of all room information the backend got | ||
| 65 | * @param func A function that gets executed when the async get finished, e.g. a signal | ||
| 66 | * @return a list of rooms received from the web service | ||
| 67 | */ | ||
| 68 | AnnounceMultiplayerRoom::RoomList GetRoomList(); | ||
| 69 | |||
| 70 | /** | ||
| 71 | * Whether the announce session is still running | ||
| 72 | */ | ||
| 73 | bool IsRunning() const; | ||
| 74 | |||
| 75 | /** | ||
| 76 | * Recreates the backend, updating the credentials. | ||
| 77 | * This can only be used when the announce session is not running. | ||
| 78 | */ | ||
| 79 | void UpdateCredentials(); | ||
| 80 | |||
| 81 | private: | ||
| 82 | Common::Event shutdown_event; | ||
| 83 | std::mutex callback_mutex; | ||
| 84 | std::set<CallbackHandle> error_callbacks; | ||
| 85 | std::unique_ptr<std::thread> announce_multiplayer_thread; | ||
| 86 | |||
| 87 | /// Backend interface that logs fields | ||
| 88 | std::unique_ptr<AnnounceMultiplayerRoom::Backend> backend; | ||
| 89 | |||
| 90 | std::atomic_bool registered = false; ///< Whether the room has been registered | ||
| 91 | |||
| 92 | void UpdateBackendData(std::shared_ptr<Network::Room> room); | ||
| 93 | void AnnounceMultiplayerLoop(); | ||
| 94 | }; | ||
| 95 | |||
| 96 | } // namespace Core | ||
diff --git a/src/core/core.cpp b/src/core/core.cpp index 0ede0d85c..5df32c1e7 100644 --- a/src/core/core.cpp +++ b/src/core/core.cpp | |||
| @@ -43,14 +43,15 @@ | |||
| 43 | #include "core/hle/service/service.h" | 43 | #include "core/hle/service/service.h" |
| 44 | #include "core/hle/service/sm/sm.h" | 44 | #include "core/hle/service/sm/sm.h" |
| 45 | #include "core/hle/service/time/time_manager.h" | 45 | #include "core/hle/service/time/time_manager.h" |
| 46 | #include "core/internal_network/network.h" | ||
| 46 | #include "core/loader/loader.h" | 47 | #include "core/loader/loader.h" |
| 47 | #include "core/memory.h" | 48 | #include "core/memory.h" |
| 48 | #include "core/memory/cheat_engine.h" | 49 | #include "core/memory/cheat_engine.h" |
| 49 | #include "core/network/network.h" | ||
| 50 | #include "core/perf_stats.h" | 50 | #include "core/perf_stats.h" |
| 51 | #include "core/reporter.h" | 51 | #include "core/reporter.h" |
| 52 | #include "core/telemetry_session.h" | 52 | #include "core/telemetry_session.h" |
| 53 | #include "core/tools/freezer.h" | 53 | #include "core/tools/freezer.h" |
| 54 | #include "network/network.h" | ||
| 54 | #include "video_core/renderer_base.h" | 55 | #include "video_core/renderer_base.h" |
| 55 | #include "video_core/video_core.h" | 56 | #include "video_core/video_core.h" |
| 56 | 57 | ||
| @@ -315,6 +316,15 @@ struct System::Impl { | |||
| 315 | GetAndResetPerfStats(); | 316 | GetAndResetPerfStats(); |
| 316 | perf_stats->BeginSystemFrame(); | 317 | perf_stats->BeginSystemFrame(); |
| 317 | 318 | ||
| 319 | std::string name = "Unknown Game"; | ||
| 320 | const Loader::ResultStatus res{app_loader->ReadTitle(name)}; | ||
| 321 | if (auto room_member = Network::GetRoomMember().lock()) { | ||
| 322 | Network::GameInfo game_info; | ||
| 323 | game_info.name = name; | ||
| 324 | game_info.id = program_id; | ||
| 325 | room_member->SendGameInfo(game_info); | ||
| 326 | } | ||
| 327 | |||
| 318 | status = SystemResultStatus::Success; | 328 | status = SystemResultStatus::Success; |
| 319 | return status; | 329 | return status; |
| 320 | } | 330 | } |
| @@ -362,6 +372,11 @@ struct System::Impl { | |||
| 362 | memory.Reset(); | 372 | memory.Reset(); |
| 363 | applet_manager.ClearAll(); | 373 | applet_manager.ClearAll(); |
| 364 | 374 | ||
| 375 | if (auto room_member = Network::GetRoomMember().lock()) { | ||
| 376 | Network::GameInfo game_info{}; | ||
| 377 | room_member->SendGameInfo(game_info); | ||
| 378 | } | ||
| 379 | |||
| 365 | LOG_DEBUG(Core, "Shutdown OK"); | 380 | LOG_DEBUG(Core, "Shutdown OK"); |
| 366 | } | 381 | } |
| 367 | 382 | ||
diff --git a/src/core/hle/service/nifm/nifm.cpp b/src/core/hle/service/nifm/nifm.cpp index 7055ea93e..2889973e4 100644 --- a/src/core/hle/service/nifm/nifm.cpp +++ b/src/core/hle/service/nifm/nifm.cpp | |||
| @@ -18,8 +18,8 @@ namespace { | |||
| 18 | 18 | ||
| 19 | } // Anonymous namespace | 19 | } // Anonymous namespace |
| 20 | 20 | ||
| 21 | #include "core/network/network.h" | 21 | #include "core/internal_network/network.h" |
| 22 | #include "core/network/network_interface.h" | 22 | #include "core/internal_network/network_interface.h" |
| 23 | 23 | ||
| 24 | namespace Service::NIFM { | 24 | namespace Service::NIFM { |
| 25 | 25 | ||
diff --git a/src/core/hle/service/sockets/bsd.cpp b/src/core/hle/service/sockets/bsd.cpp index 3e9dc4a13..c7194731e 100644 --- a/src/core/hle/service/sockets/bsd.cpp +++ b/src/core/hle/service/sockets/bsd.cpp | |||
| @@ -13,8 +13,8 @@ | |||
| 13 | #include "core/hle/kernel/k_thread.h" | 13 | #include "core/hle/kernel/k_thread.h" |
| 14 | #include "core/hle/service/sockets/bsd.h" | 14 | #include "core/hle/service/sockets/bsd.h" |
| 15 | #include "core/hle/service/sockets/sockets_translate.h" | 15 | #include "core/hle/service/sockets/sockets_translate.h" |
| 16 | #include "core/network/network.h" | 16 | #include "core/internal_network/network.h" |
| 17 | #include "core/network/sockets.h" | 17 | #include "core/internal_network/sockets.h" |
| 18 | 18 | ||
| 19 | namespace Service::Sockets { | 19 | namespace Service::Sockets { |
| 20 | 20 | ||
diff --git a/src/core/hle/service/sockets/bsd.h b/src/core/hle/service/sockets/bsd.h index fed740d87..9ea36428d 100644 --- a/src/core/hle/service/sockets/bsd.h +++ b/src/core/hle/service/sockets/bsd.h | |||
| @@ -16,7 +16,7 @@ class System; | |||
| 16 | 16 | ||
| 17 | namespace Network { | 17 | namespace Network { |
| 18 | class Socket; | 18 | class Socket; |
| 19 | } | 19 | } // namespace Network |
| 20 | 20 | ||
| 21 | namespace Service::Sockets { | 21 | namespace Service::Sockets { |
| 22 | 22 | ||
diff --git a/src/core/hle/service/sockets/sockets_translate.cpp b/src/core/hle/service/sockets/sockets_translate.cpp index 9c0936d97..2db10ec81 100644 --- a/src/core/hle/service/sockets/sockets_translate.cpp +++ b/src/core/hle/service/sockets/sockets_translate.cpp | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | #include "common/common_types.h" | 7 | #include "common/common_types.h" |
| 8 | #include "core/hle/service/sockets/sockets.h" | 8 | #include "core/hle/service/sockets/sockets.h" |
| 9 | #include "core/hle/service/sockets/sockets_translate.h" | 9 | #include "core/hle/service/sockets/sockets_translate.h" |
| 10 | #include "core/network/network.h" | 10 | #include "core/internal_network/network.h" |
| 11 | 11 | ||
| 12 | namespace Service::Sockets { | 12 | namespace Service::Sockets { |
| 13 | 13 | ||
diff --git a/src/core/hle/service/sockets/sockets_translate.h b/src/core/hle/service/sockets/sockets_translate.h index 5e9809add..c93291d3e 100644 --- a/src/core/hle/service/sockets/sockets_translate.h +++ b/src/core/hle/service/sockets/sockets_translate.h | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | 7 | ||
| 8 | #include "common/common_types.h" | 8 | #include "common/common_types.h" |
| 9 | #include "core/hle/service/sockets/sockets.h" | 9 | #include "core/hle/service/sockets/sockets.h" |
| 10 | #include "core/network/network.h" | 10 | #include "core/internal_network/network.h" |
| 11 | 11 | ||
| 12 | namespace Service::Sockets { | 12 | namespace Service::Sockets { |
| 13 | 13 | ||
diff --git a/src/core/network/network.cpp b/src/core/internal_network/network.cpp index fdafbea92..36c43cc8f 100644 --- a/src/core/network/network.cpp +++ b/src/core/internal_network/network.cpp | |||
| @@ -29,9 +29,9 @@ | |||
| 29 | #include "common/common_types.h" | 29 | #include "common/common_types.h" |
| 30 | #include "common/logging/log.h" | 30 | #include "common/logging/log.h" |
| 31 | #include "common/settings.h" | 31 | #include "common/settings.h" |
| 32 | #include "core/network/network.h" | 32 | #include "core/internal_network/network.h" |
| 33 | #include "core/network/network_interface.h" | 33 | #include "core/internal_network/network_interface.h" |
| 34 | #include "core/network/sockets.h" | 34 | #include "core/internal_network/sockets.h" |
| 35 | 35 | ||
| 36 | namespace Network { | 36 | namespace Network { |
| 37 | 37 | ||
diff --git a/src/core/network/network.h b/src/core/internal_network/network.h index 10e5ef10d..10e5ef10d 100644 --- a/src/core/network/network.h +++ b/src/core/internal_network/network.h | |||
diff --git a/src/core/network/network_interface.cpp b/src/core/internal_network/network_interface.cpp index 15ecc6abf..0f0a66160 100644 --- a/src/core/network/network_interface.cpp +++ b/src/core/internal_network/network_interface.cpp | |||
| @@ -11,7 +11,7 @@ | |||
| 11 | #include "common/logging/log.h" | 11 | #include "common/logging/log.h" |
| 12 | #include "common/settings.h" | 12 | #include "common/settings.h" |
| 13 | #include "common/string_util.h" | 13 | #include "common/string_util.h" |
| 14 | #include "core/network/network_interface.h" | 14 | #include "core/internal_network/network_interface.h" |
| 15 | 15 | ||
| 16 | #ifdef _WIN32 | 16 | #ifdef _WIN32 |
| 17 | #include <iphlpapi.h> | 17 | #include <iphlpapi.h> |
diff --git a/src/core/network/network_interface.h b/src/core/internal_network/network_interface.h index 9b98b6b42..9b98b6b42 100644 --- a/src/core/network/network_interface.h +++ b/src/core/internal_network/network_interface.h | |||
diff --git a/src/core/network/sockets.h b/src/core/internal_network/sockets.h index f889159f5..77e27e928 100644 --- a/src/core/network/sockets.h +++ b/src/core/internal_network/sockets.h | |||
| @@ -3,6 +3,7 @@ | |||
| 3 | 3 | ||
| 4 | #pragma once | 4 | #pragma once |
| 5 | 5 | ||
| 6 | #include <map> | ||
| 6 | #include <memory> | 7 | #include <memory> |
| 7 | #include <utility> | 8 | #include <utility> |
| 8 | 9 | ||
| @@ -12,7 +13,7 @@ | |||
| 12 | #endif | 13 | #endif |
| 13 | 14 | ||
| 14 | #include "common/common_types.h" | 15 | #include "common/common_types.h" |
| 15 | #include "core/network/network.h" | 16 | #include "core/internal_network/network.h" |
| 16 | 17 | ||
| 17 | // TODO: C++20 Replace std::vector usages with std::span | 18 | // TODO: C++20 Replace std::vector usages with std::span |
| 18 | 19 | ||