// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved. #pragma once #include "Engine/Scripting/ScriptingType.h" #include "Types.h" /// /// Low-level network service. Provides network peer management functionality. /// API_CLASS(Namespace="FlaxEngine.Networking", Static) class FLAXENGINE_API NetworkManager { DECLARE_SCRIPTING_TYPE_NO_SPAWN(NetworkManager); public: /// /// Creates new peer using given configuration. /// /// The configuration to create and setup new peer. /// The peer. /// Peer should be destroyed using once it is no longer in use. API_FUNCTION() static NetworkPeer* CreatePeer(const NetworkConfig& config); /// /// Shutdowns and destroys given peer. /// /// The peer to destroy. API_FUNCTION() static void ShutdownPeer(NetworkPeer* peer); };