You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

50 lines
1.1 KiB

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,
}
}