using System; using System.Runtime.CompilerServices; using UnityEngine.Scripting; namespace UnityEngine.Networking { // Token: 0x020002D1 RID: 721 internal sealed class ConnectionConfigInternal : IDisposable { // Token: 0x06002FA3 RID: 12195 RVA: 0x00045BCC File Offset: 0x00043DCC private ConnectionConfigInternal() { } // Token: 0x06002FA4 RID: 12196 RVA: 0x00045BD8 File Offset: 0x00043DD8 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.InitSendDelay(config.SendDelay); this.InitMaxCombinedReliableMessageSize(config.MaxCombinedReliableMessageSize); this.InitMaxCombinedReliableMessageCount(config.MaxCombinedReliableMessageCount); this.InitMaxSentMessageQueueSize(config.MaxSentMessageQueueSize); this.InitAcksType((int)config.AcksType); this.InitUsePlatformSpecificProtocols(config.UsePlatformSpecificProtocols); this.InitInitialBandwidth(config.InitialBandwidth); this.InitBandwidthPeakFactor(config.BandwidthPeakFactor); this.InitWebSocketReceiveBufferMaxSize(config.WebSocketReceiveBufferMaxSize); this.InitUdpSocketReceiveBufferMaxSize(config.UdpSocketReceiveBufferMaxSize); if (config.SSLCertFilePath != null) { int num = this.InitSSLCertFilePath(config.SSLCertFilePath); if (num != 0) { throw new ArgumentOutOfRangeException("SSLCertFilePath cannot be > than " + num.ToString()); } } if (config.SSLPrivateKeyFilePath != null) { int num2 = this.InitSSLPrivateKeyFilePath(config.SSLPrivateKeyFilePath); if (num2 != 0) { throw new ArgumentOutOfRangeException("SSLPrivateKeyFilePath cannot be > than " + num2.ToString()); } } if (config.SSLCAFilePath != null) { int num3 = this.InitSSLCAFilePath(config.SSLCAFilePath); if (num3 != 0) { throw new ArgumentOutOfRangeException("SSLCAFilePath cannot be > than " + num3.ToString()); } } byte b = 0; while ((int)b < config.ChannelCount) { this.AddChannel(config.GetChannel(b)); b += 1; } } // Token: 0x06002FA5 RID: 12197 [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] public extern void InitWrapper(); // Token: 0x06002FA6 RID: 12198 [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] public extern byte AddChannel(QosType value); // Token: 0x06002FA7 RID: 12199 [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] public extern QosType GetChannel(int i); // Token: 0x17000AE6 RID: 2790 // (get) Token: 0x06002FA8 RID: 12200 public extern int ChannelSize { [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] get; } // Token: 0x06002FA9 RID: 12201 [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] public extern void InitPacketSize(ushort value); // Token: 0x06002FAA RID: 12202 [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] public extern void InitFragmentSize(ushort value); // Token: 0x06002FAB RID: 12203 [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] public extern void InitResendTimeout(uint value); // Token: 0x06002FAC RID: 12204 [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] public extern void InitDisconnectTimeout(uint value); // Token: 0x06002FAD RID: 12205 [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] public extern void InitConnectTimeout(uint value); // Token: 0x06002FAE RID: 12206 [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] public extern void InitMinUpdateTimeout(uint value); // Token: 0x06002FAF RID: 12207 [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] public extern void InitPingTimeout(uint value); // Token: 0x06002FB0 RID: 12208 [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] public extern void InitReducedPingTimeout(uint value); // Token: 0x06002FB1 RID: 12209 [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] public extern void InitAllCostTimeout(uint value); // Token: 0x06002FB2 RID: 12210 [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] public extern void InitNetworkDropThreshold(byte value); // Token: 0x06002FB3 RID: 12211 [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] public extern void InitOverflowDropThreshold(byte value); // Token: 0x06002FB4 RID: 12212 [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] public extern void InitMaxConnectionAttempt(byte value); // Token: 0x06002FB5 RID: 12213 [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] public extern void InitAckDelay(uint value); // Token: 0x06002FB6 RID: 12214 [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] public extern void InitSendDelay(uint value); // Token: 0x06002FB7 RID: 12215 [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] public extern void InitMaxCombinedReliableMessageSize(ushort value); // Token: 0x06002FB8 RID: 12216 [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] public extern void InitMaxCombinedReliableMessageCount(ushort value); // Token: 0x06002FB9 RID: 12217 [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] public extern void InitMaxSentMessageQueueSize(ushort value); // Token: 0x06002FBA RID: 12218 [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] public extern void InitAcksType(int value); // Token: 0x06002FBB RID: 12219 [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] public extern void InitUsePlatformSpecificProtocols(bool value); // Token: 0x06002FBC RID: 12220 [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] public extern void InitInitialBandwidth(uint value); // Token: 0x06002FBD RID: 12221 [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] public extern void InitBandwidthPeakFactor(float value); // Token: 0x06002FBE RID: 12222 [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] public extern void InitWebSocketReceiveBufferMaxSize(ushort value); // Token: 0x06002FBF RID: 12223 [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] public extern void InitUdpSocketReceiveBufferMaxSize(uint value); // Token: 0x06002FC0 RID: 12224 [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] public extern int InitSSLCertFilePath(string value); // Token: 0x06002FC1 RID: 12225 [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] public extern int InitSSLPrivateKeyFilePath(string value); // Token: 0x06002FC2 RID: 12226 [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] public extern int InitSSLCAFilePath(string value); // Token: 0x06002FC3 RID: 12227 [ThreadAndSerializationSafe] [GeneratedByOldBindingsGenerator] [MethodImpl(MethodImplOptions.InternalCall)] public extern void Dispose(); // Token: 0x06002FC4 RID: 12228 RVA: 0x00045DF8 File Offset: 0x00043FF8 ~ConnectionConfigInternal() { this.Dispose(); } // Token: 0x04000978 RID: 2424 internal IntPtr m_Ptr; } }