Remove deprecated NetworkDriverType
This commit is contained in:
@@ -6,23 +6,6 @@
|
||||
|
||||
class ScriptingObject;
|
||||
|
||||
/// <summary>
|
||||
/// Network driver implementations enum.
|
||||
/// [Deprecated in v1.3]
|
||||
/// </summary>
|
||||
API_ENUM(Namespace="FlaxEngine.Networking") enum class DEPRECATED() NetworkDriverType
|
||||
{
|
||||
/// <summary>
|
||||
/// Invalid network driver implementation.
|
||||
/// </summary>
|
||||
Undefined = 0,
|
||||
|
||||
/// <summary>
|
||||
/// ENet library based network driver implementation.
|
||||
/// </summary>
|
||||
ENet
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// Low-level network configuration structure. Provides settings for the network driver and all internal components.
|
||||
/// </summary>
|
||||
@@ -30,14 +13,6 @@ API_STRUCT(Namespace="FlaxEngine.Networking") struct FLAXENGINE_API NetworkConfi
|
||||
{
|
||||
DECLARE_SCRIPTING_TYPE_MINIMAL(NetworkConfig);
|
||||
|
||||
/// <summary>
|
||||
/// The network driver that will be used to create the peer.
|
||||
/// To allow two peers to connect, they must use the same host.
|
||||
/// [Deprecated in v1.3]
|
||||
/// </summary>
|
||||
API_FIELD()
|
||||
DEPRECATED("Use NetworkDriver field instead") NetworkDriverType NetworkDriverType;
|
||||
|
||||
/// <summary>
|
||||
/// The network driver instance (implements INetworkDriver) that will be used to create and manage the peer, send and receive messages.
|
||||
/// </summary>
|
||||
@@ -81,15 +56,4 @@ API_STRUCT(Namespace="FlaxEngine.Networking") struct FLAXENGINE_API NetworkConfi
|
||||
/// </remarks>
|
||||
API_FIELD()
|
||||
uint16 MessagePoolSize = 2048;
|
||||
|
||||
// Ignore deprecation warnings in defaults
|
||||
PRAGMA_DISABLE_DEPRECATION_WARNINGS
|
||||
NetworkConfig()
|
||||
{
|
||||
NetworkDriverType = NetworkDriverType::ENet;
|
||||
}
|
||||
NetworkConfig(const NetworkConfig& other) = default;
|
||||
NetworkConfig(NetworkConfig&& other) = default;
|
||||
NetworkConfig& operator=(const NetworkConfig& other) = default;
|
||||
PRAGMA_ENABLE_DEPRECATION_WARNINGS
|
||||
};
|
||||
|
||||
@@ -22,10 +22,6 @@ bool NetworkPeer::Initialize(const NetworkConfig& config)
|
||||
return true;
|
||||
|
||||
Config = config;
|
||||
PRAGMA_DISABLE_DEPRECATION_WARNINGS
|
||||
if (Config.NetworkDriver == nullptr && Config.NetworkDriverType == NetworkDriverType::ENet)
|
||||
Config.NetworkDriver = New<ENetDriver>();
|
||||
PRAGMA_ENABLE_DEPRECATION_WARNINGS
|
||||
|
||||
if (Config.NetworkDriver == nullptr)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user