コード例 #1
0
        public GlobalConfigInternal(GlobalConfig config)
        {
            bool flag = config == null;

            if (flag)
            {
                throw new NullReferenceException("config is not defined");
            }
            this.m_Ptr = GlobalConfigInternal.InternalCreate();
            this.ThreadAwakeTimeout             = config.ThreadAwakeTimeout;
            this.ReactorModel                   = (byte)config.ReactorModel;
            this.ReactorMaximumReceivedMessages = config.ReactorMaximumReceivedMessages;
            this.ReactorMaximumSentMessages     = config.ReactorMaximumSentMessages;
            this.MaxPacketSize                  = config.MaxPacketSize;
            this.MaxHosts = config.MaxHosts;
            bool flag2 = config.ThreadPoolSize == 0 || config.ThreadPoolSize > 254;

            if (flag2)
            {
                throw new ArgumentOutOfRangeException("Worker thread pool size should be >= 1 && < 254 (for server only)");
            }
            byte threadPoolSize = config.ThreadPoolSize;
            bool flag3          = config.ThreadPoolSize > 1;

            if (flag3)
            {
                Debug.LogWarning("Worker thread pool size can be > 1 only for server platforms: Win, OSX or Linux");
                threadPoolSize = 1;
            }
            this.ThreadPoolSize         = threadPoolSize;
            this.MinTimerTimeout        = config.MinTimerTimeout;
            this.MaxTimerTimeout        = config.MaxTimerTimeout;
            this.MinNetSimulatorTimeout = config.MinNetSimulatorTimeout;
            this.MaxNetSimulatorTimeout = config.MaxNetSimulatorTimeout;
        }
コード例 #2
0
        public void Dispose()
        {
            bool flag = this.m_Ptr != IntPtr.Zero;

            if (flag)
            {
                GlobalConfigInternal.InternalDestroy(this.m_Ptr);
                this.m_Ptr = IntPtr.Zero;
            }
        }
コード例 #3
0
        protected virtual void Dispose(bool disposing)
        {
            bool flag = this.m_Ptr != IntPtr.Zero;

            if (flag)
            {
                GlobalConfigInternal.InternalDestroy(this.m_Ptr);
                this.m_Ptr = IntPtr.Zero;
            }
        }
コード例 #4
0
 private static extern void InitWithParameters(GlobalConfigInternal config);
コード例 #5
0
 extern private static void InitializeClassWithConfig(GlobalConfigInternal config);
コード例 #6
0
 private static extern void InitWithParameters(GlobalConfigInternal config);
コード例 #7
0
 private static void InitWithParameters(GlobalConfigInternal config)
 {
     throw new NotImplementedException("なにこれ");
 }