/// <summary> /// 创建一个适用于被动方的ALE Connection。 /// </summary> public AleConnectionServer(RsspEndPoint rsspEP, IAuMessageBuilder auMsgProvider, IAleConnectionObserver observer, IAleTunnelEventNotifier tunnelEventNotifier) : base(rsspEP, auMsgProvider, observer, tunnelEventNotifier) { }
/// <summary> /// 创建一个适用于被动方的SAI Connection。 /// </summary> protected SaiConnection(RsspEndPoint rsspEP, ISaiConnectionObserver observer, IAleTunnelEventNotifier tunnelEventNotifier) : this(rsspEP, observer) { _maslConnection = new MaslConnectionServer(rsspEP, this, tunnelEventNotifier); }
/// <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> /// 创建一个适用于被动方的MASL Connection。 /// </summary> protected MaslConnection(RsspEndPoint rsspEP, IMaslConnectionObserver observer, IAleTunnelEventNotifier tunnelEventNotifier) : this(observer, rsspEP) { _aleConnection = new AleConnectionServer(rsspEP, _auMsgBuilder, this, tunnelEventNotifier); }
/// <summary> /// 创建一个适用于主动方的MASL Connection。 /// </summary> protected MaslConnection(RsspEndPoint rsspEP, IEnumerable <RsspTcpLinkConfig> linkConfig, IMaslConnectionObserver observer, IAleTunnelEventNotifier tunnelEventNotifier) : this(observer, rsspEP) { _aleConnection = new AleConnectionClient(rsspEP, linkConfig, _auMsgBuilder, this, tunnelEventNotifier); }
/// <summary> /// 构造函数。 /// </summary> private SaiConnection(RsspEndPoint rsspEP, ISaiConnectionObserver observer) { _rsspEndPoint = rsspEP; _observer = observer; _seqNoManager = new SeqNoManager(0, ushort.MaxValue, rsspEP.SeqNoThreshold); _handshakeTimeoutMgr = new HandshakeTimeoutManager(SaiConnection.HandshakeTimeout, this); this.Initialize(); }
private MaslConnection(IMaslConnectionObserver observer, RsspEndPoint rsspEP) { _observer = observer; _rsspEndPoint = rsspEP; _currentState = this.GetInitialState(); _macCalculator = new TrippleDesMacCalculator(rsspEP.AuthenticationKeys); _auMsgBuilder = new AuMessageBuilder(rsspEP, _macCalculator); _handshakeTimeoutMgr = new HandshakeTimeoutManager(MaslConnection.HandshakeTimeout, this); }
/// <summary> /// 创建一个适用于主动方的ALE Connection。 /// </summary> public AleConnectionClient(RsspEndPoint rsspEP, IEnumerable <RsspTcpLinkConfig> linkConfig, IAuMessageBuilder auMsgProvider, IAleConnectionObserver observer, IAleTunnelEventNotifier tcpEventNotifier) : base(rsspEP, auMsgProvider, observer, tcpEventNotifier) { linkConfig.ToList().ForEach(p => { var item = new AleClientTunnel(p.ClientIpAddress, p.ServerEndPoint, this); this.AddConnection(item); }); }
/// <summary> /// 构造函数。 /// </summary> protected AleConnection(RsspEndPoint rsspEP, IAuMessageBuilder auMsgProvider, IAleConnectionObserver observer, IAleTunnelEventNotifier tunnelEventNotifier) { _rsspEndPoint = rsspEP; _auMsgBuilder = auMsgProvider; _observer = observer; _tunnelEventNotifier = tunnelEventNotifier; _seqNoManager = new SeqNoManager(0, UInt16.MaxValue, rsspEP.SeqNoThreshold); this.Initialize(); }
/// <summary> /// 创建一个适用于主动方的SAI Connection。 /// </summary> public SaiConnectionClient(RsspEndPoint rsspEP, IEnumerable <RsspTcpLinkConfig> linkConfig, ISaiConnectionObserver observer, IAleTunnelEventNotifier tunnelEventNotifier) : base(rsspEP, linkConfig, observer, tunnelEventNotifier) { }
/// <summary> /// 创建一个适用于被动方的SAI Connection。 /// </summary> public SaiConnectionServer(RsspEndPoint rsspEP, ISaiConnectionObserver observer, IAleTunnelEventNotifier tunnelEventNotifier) : base(rsspEP, observer, tunnelEventNotifier) { }
public AuMessageBuilder(RsspEndPoint rsspEP, IMacCalculator calc) { _rsspEndPoint = rsspEP; _macCalc = calc; }