Always use static socket factory for emscripten

This commit is contained in:
momo5502
2025-04-18 08:15:17 +02:00
parent baa2fc5fa6
commit 4ac8d853a6
4 changed files with 8 additions and 2 deletions

View File

@@ -4,7 +4,7 @@
#include <gtest/gtest.h>
#include <windows_emulator.hpp>
#include "static_socket_factory.hpp"
#include <network/static_socket_factory.hpp>
#define ASSERT_NOT_TERMINATED(win_emu) \
do \

View File

@@ -1,6 +1,6 @@
#pragma once
#include <network/socket_factory.hpp>
#include "socket_factory.hpp"
namespace network
{

View File

@@ -16,6 +16,8 @@
#include "exception_dispatch.hpp"
#include "apiset/apiset.hpp"
#include "network/static_socket_factory.hpp"
constexpr auto MAX_INSTRUCTIONS_PER_TIME_SLICE = 100000;
namespace
@@ -257,7 +259,11 @@ namespace
return std::move(interfaces.socket_factory);
}
#ifdef OS_EMSCRIPTEN
return network::create_static_socket_factory();
#else
return std::make_unique<network::socket_factory>();
#endif
}
}