/// <summary> /// 释放资源 /// </summary> /// <param name="disposing">是否也释放托管资源</param> protected virtual void Dispose(bool disposing) { if (this.IsListening == true) { this.listenSocket.Close(); this.listenSocket.Dispose(); } this.acceptArg.Dispose(); this.sessionManager.Dispose(); this.plugManager.Clear(); this.middlewareManager.Clear(); if (disposing == true) { this.listenSocket = null; this.acceptArg = null; this.plugManager = null; this.middlewareManager = null; this.sessionManager = null; this.LocalEndPoint = null; this.IsListening = false; this.KeepAlivePeriod = TimeSpan.Zero; } }
/// <summary> /// 调试视图 /// </summary> /// <param name="view">查看的对象</param> public SessionCollectionDebugView(TcpSessionManager view) { this.view = view; }