/// <summary> /// 创建一个适用于主动方的SAI Connection。 /// </summary> protected SaiConnection(RsspEndPoint rsspEP, IEnumerable <RsspTcpLinkConfig> linkConfig, ISaiConnectionObserver observer, IAleTunnelEventNotifier tunnelEventNotifier) : this(rsspEP, observer) { _maslConnection = new MaslConnectionClient(rsspEP, linkConfig, this, tunnelEventNotifier); }
/// <summary> /// 创建一个适用于被动方的SAI Connection。 /// </summary> protected SaiConnection(RsspEndPoint rsspEP, ISaiConnectionObserver observer, IAleTunnelEventNotifier tunnelEventNotifier) : this(rsspEP, observer) { _maslConnection = new MaslConnectionServer(rsspEP, this, tunnelEventNotifier); }
protected virtual void Dispose(bool disposing) { if (!_disposed) { _disposed = true; this.Connected = false; if (disposing) { if (_handshakeTimeoutMgr != null) { _handshakeTimeoutMgr.Dispose(); _handshakeTimeoutMgr = null; } if (_maslConnection != null) { _maslConnection.Dispose(); _maslConnection = null; } if (_defenseStrategy != null) { _defenseStrategy.Dispose(); _defenseStrategy = null; } } } }