/// <summary>
 /// 创建一个适用于被动方的ALE Connection。
 /// </summary>
 public AleConnectionServer(RsspEndPoint rsspEP,
                            IAuMessageBuilder auMsgProvider,
                            IAleConnectionObserver observer,
                            IAleTunnelEventNotifier tunnelEventNotifier)
     : base(rsspEP, auMsgProvider, observer, tunnelEventNotifier)
 {
 }
 /// <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);
     });
 }
Exemple #3
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();
        }