UnityEngine.Networking.ConnectionConfig.GetChannel C# (CSharp) Method

GetChannel() public method

Return the QoS set for the given channel or throw an out of range exception.

public GetChannel ( byte idx ) : QosType
idx byte Index in array.
return QosType
        public QosType GetChannel(byte idx)
        {
            if (idx >= this.m_Channels.Count)
            {
                throw new ArgumentOutOfRangeException("requested index greater than maximum channels count");
            }
            return this.m_Channels[idx].QOS;
        }

Usage Example

コード例 #1
0
 public ConnectionConfigInternal(ConnectionConfig config)
 {
   if (config == null)
     throw new NullReferenceException("config is not defined");
   this.InitWrapper();
   this.InitPacketSize(config.PacketSize);
   this.InitFragmentSize(config.FragmentSize);
   this.InitResendTimeout(config.ResendTimeout);
   this.InitDisconnectTimeout(config.DisconnectTimeout);
   this.InitConnectTimeout(config.ConnectTimeout);
   this.InitMinUpdateTimeout(config.MinUpdateTimeout);
   this.InitPingTimeout(config.PingTimeout);
   this.InitReducedPingTimeout(config.ReducedPingTimeout);
   this.InitAllCostTimeout(config.AllCostTimeout);
   this.InitNetworkDropThreshold(config.NetworkDropThreshold);
   this.InitOverflowDropThreshold(config.OverflowDropThreshold);
   this.InitMaxConnectionAttempt(config.MaxConnectionAttempt);
   this.InitAckDelay(config.AckDelay);
   this.InitMaxCombinedReliableMessageSize(config.MaxCombinedReliableMessageSize);
   this.InitMaxCombinedReliableMessageCount(config.MaxCombinedReliableMessageCount);
   this.InitMaxSentMessageQueueSize(config.MaxSentMessageQueueSize);
   this.InitIsAcksLong(config.IsAcksLong);
   this.InitUsePlatformSpecificProtocols(config.UsePlatformSpecificProtocols);
   this.InitWebSocketReceiveBufferMaxSize(config.WebSocketReceiveBufferMaxSize);
   for (byte idx = 0; (int) idx < config.ChannelCount; ++idx)
   {
     int num = (int) this.AddChannel(config.GetChannel(idx));
   }
 }
All Usage Examples Of UnityEngine.Networking.ConnectionConfig::GetChannel