core/network: Add network abstraction

This commit adds a network abstraction designed to implement bsd:s but
at the same time work as a generic abstraction to implement any
networking code we have to use from core.

This is implemented on top of BSD sockets on Unix systems and winsock on
Windows. The code is designed around winsocks having compatibility
definitions to support both BSD and Windows sockets.
This commit is contained in:
ReinUsesLisp 2020-07-11 21:42:56 -03:00
parent 19c6bf72db
commit 51817f6e59
5 changed files with 840 additions and 0 deletions

View file

@ -43,6 +43,7 @@
#include "core/loader/loader.h"
#include "core/memory.h"
#include "core/memory/cheat_engine.h"
#include "core/network/network.h"
#include "core/perf_stats.h"
#include "core/reporter.h"
#include "core/settings.h"
@ -394,6 +395,9 @@ struct System::Impl {
/// Telemetry session for this emulation session
std::unique_ptr<Core::TelemetrySession> telemetry_session;
/// Network instance
Network::NetworkInstance network_instance;
ResultStatus status = ResultStatus::Success;
std::string status_details = "";