protected virtual void Dispose(bool disposing) { if (m_disposed) { return; } //if (disposing) { } m_handlerDisconnected = null; m_handlerReceived = null; m_saeaReciver = null; m_saeaSender = null; m_pooledBufferManager = null; m_queueSend = null; m_listSend.Clear(); m_listSend = null; m_bClosed = null; m_bClosing = null; m_bSending = null; m_bReceiving = null; m_disposed = true; }
protected ConsoleHandler m_consoleHandler = new ConsoleHandler(); // ConsoleHandler public virtual bool Initialize() { m_bStopped = new fmBool(); m_bRunning = new fmBool(); // 관리되지 않는 예외 일 경우 핸들러 AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(OnUnhandledException); // 정책: 서버별 내부 쓰레드 수 조절 // ThreadPoolEx 안에 추가 설명 적어 놓음. TheadPoolEx.SetMinMaxThreads( m_config.m_thread.m_nMinSync == 0 ? Environment.ProcessorCount : m_config.m_thread.m_nMinSync, m_config.m_thread.m_nMaxSync == 0 ? (int)(Environment.ProcessorCount * 2) : m_config.m_thread.m_nMaxSync, m_config.m_thread.m_nMinAsync == 0 ? Environment.ProcessorCount : m_config.m_thread.m_nMinAsync, m_config.m_thread.m_nMaxAsync == 0 ? (int)(Environment.ProcessorCount * 3) : m_config.m_thread.m_nMaxAsync); int maxsync; int maxAsync; System.Threading.ThreadPool.GetMaxThreads(out maxsync, out maxAsync); Logger.Info("Server Initialize-> maxsync:{0}, maxAsync:{1}]", maxsync, maxAsync); return(true); }