Пример #1
0
 /// <summary>
 /// 创建一个适用于被动方的ALE Connection。
 /// </summary>
 public AleConnectionServer(RsspEndPoint rsspEP,
                            IAuMessageBuilder auMsgProvider,
                            IAleConnectionObserver observer,
                            IAleTunnelEventNotifier tunnelEventNotifier)
     : base(rsspEP, auMsgProvider, observer, tunnelEventNotifier)
 {
 }
Пример #2
0
 /// <summary>
 /// 创建一个适用于被动方的SAI Connection。
 /// </summary>
 protected SaiConnection(RsspEndPoint rsspEP,
                         ISaiConnectionObserver observer,
                         IAleTunnelEventNotifier tunnelEventNotifier)
     : this(rsspEP, observer)
 {
     _maslConnection = new MaslConnectionServer(rsspEP, this, tunnelEventNotifier);
 }
Пример #3
0
 /// <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);
 }
Пример #4
0
 /// <summary>
 /// 创建一个适用于被动方的MASL Connection。
 /// </summary>
 protected MaslConnection(RsspEndPoint rsspEP,
                          IMaslConnectionObserver observer,
                          IAleTunnelEventNotifier tunnelEventNotifier)
     : this(observer, rsspEP)
 {
     _aleConnection = new AleConnectionServer(rsspEP,
                                              _auMsgBuilder, this, tunnelEventNotifier);
 }
Пример #5
0
 /// <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);
 }
Пример #6
0
        /// <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();
        }
Пример #7
0
        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);
        }
Пример #8
0
 /// <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);
     });
 }
Пример #9
0
        /// <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();
        }
Пример #10
0
 /// <summary>
 /// 创建一个适用于主动方的SAI Connection。
 /// </summary>
 public SaiConnectionClient(RsspEndPoint rsspEP, IEnumerable <RsspTcpLinkConfig> linkConfig,
                            ISaiConnectionObserver observer,
                            IAleTunnelEventNotifier tunnelEventNotifier)
     : base(rsspEP, linkConfig, observer, tunnelEventNotifier)
 {
 }
Пример #11
0
 /// <summary>
 /// 创建一个适用于被动方的SAI Connection。
 /// </summary>
 public SaiConnectionServer(RsspEndPoint rsspEP,
                            ISaiConnectionObserver observer,
                            IAleTunnelEventNotifier tunnelEventNotifier)
     : base(rsspEP, observer, tunnelEventNotifier)
 {
 }
Пример #12
0
        public AuMessageBuilder(RsspEndPoint rsspEP, IMacCalculator calc)
        {
            _rsspEndPoint = rsspEP;

            _macCalc = calc;
        }