using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.Networking;
|
|
|
|
|
|
|
|
namespace Multiplayer
|
|
{
|
|
|
|
public static class ChannelConfig
|
|
{
|
|
public static QosType[] GetDefaultChannels()
|
|
{
|
|
QosType[] retVal = new QosType[3];
|
|
|
|
retVal[0] = QosType.Reliable;
|
|
retVal[1] = QosType.StateUpdate;
|
|
retVal[2] = QosType.UnreliableSequenced;
|
|
|
|
return retVal;
|
|
}
|
|
|
|
public static HostTopology DefaultTopology()
|
|
{
|
|
ConnectionConfig config = DefaultConfig();
|
|
return new HostTopology(config, 8);
|
|
}
|
|
|
|
public static ConnectionConfig DefaultConfig()
|
|
{
|
|
ConnectionConfig DefaultConfig = new ConnectionConfig();
|
|
|
|
QosType[] Channels = GetDefaultChannels();
|
|
foreach (QosType channel in Channels)
|
|
DefaultConfig.AddChannel(channel);
|
|
|
|
return DefaultConfig;
|
|
}
|
|
|
|
|
|
}
|
|
|
|
public enum ServerChannel
|
|
{
|
|
Reliable = 0,
|
|
StateUpdate = 1,
|
|
UnreliableSequenced = 2,
|
|
}
|
|
}
|