Valks-Games / Unity-Transport-Layer-UDP-Model

Learning the new Unity Transport Layer
MIT License
3 stars 0 forks source link

Setting the Timeout Param in Driver() #12

Closed valkyrienyanko closed 4 years ago

valkyrienyanko commented 4 years ago

How do you add or find the params to add for public NetworkDriver(INetworkInterface netIf, params INetworkParameter[] param);?

When I go to the meta data for INetworkParameter[] all I get is as follows.

#region Assembly Unity.Networking.Transport, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
// Unity.Networking.Transport.dll
#endregion

namespace Unity.Networking.Transport
{
    public interface INetworkParameter
    {
    }
}
valkyrienyanko commented 4 years ago

https://docs.unity3d.com/Packages/com.unity.transport@0.3/api/Unity.Networking.Transport.NetworkConfigParameter.html

valkyrienyanko commented 4 years ago
var config = new NetworkConfigParameter {
    connectTimeoutMS = CONNECT_TIMEOUT,
    disconnectTimeoutMS = DISCONNECT_TIMEOUT,
    maxConnectAttempts = MAX_CONNECTION_ATTEMPTS
};

Driver = NetworkDriver.Create(config);