상속: CSharpRTMP.Core.Protocols.Rtmfp.OutboundHandshake
예제 #1
0
        public void Start(string url, string filePath)
        {
            Url = url;
            var uri  = new Uri(url);
            var segs = uri.Segments.ToList();

            segs.RemoveAt(0);
            StreamName = segs.Last();
            segs.Remove(StreamName);
            AppName    = string.Join("", segs);
            TcUrl      = url.Remove(url.LastIndexOf(StreamName));
            StreamName = StreamName.TrimStart('/');

            FilePath = filePath;
            Session  = DownloadSession = new DownloadSession(this);
            var app = new BaseClientApplication(Variant.GetMap(new VariantMapHelper
            {
                { Defines.CONF_APPLICATION_NAME, AppName }
            }))
            {
                Id = 1
            };

            Application = app;
            DownloadSession.Connect(url);
            Status    = "正在连接";
            StartTime = DateTime.Now;
            OnPropertyChanged(nameof(TimeSpent));
        }
예제 #2
0
        public void Restart()
        {
            this.RegisterProtocol();
            var udpProtocol = new UDPProtocol {
                NearProtocol = this
            };

            UDPCarrier.Create("", 0, this);
            Session = DownloadSession = new DownloadSession(this);
            DownloadSession.Connect(Url);
            Status    = "正在连接";
            StartTime = DateTime.Now;
            OnPropertyChanged(nameof(TimeSpent));
        }
예제 #3
0
 public void Start(string url,string filePath)
 {
     Url = url;
     var uri = new Uri(url);
     var segs = uri.Segments.ToList();
     segs.RemoveAt(0);
     StreamName = segs.Last();
     segs.Remove(StreamName);
     AppName = string.Join("", segs);
     TcUrl = url.Remove(url.LastIndexOf(StreamName));
     StreamName = StreamName.TrimStart('/');
     
     FilePath = filePath;
     Session = DownloadSession = new DownloadSession(this);
     var app = new BaseClientApplication(Variant.GetMap(new VariantMapHelper
     {
         {Defines.CONF_APPLICATION_NAME, AppName}
     })) {Id = 1};
     Application = app;
     DownloadSession.Connect(url);
     Status = "正在连接";
     StartTime = DateTime.Now;
     OnPropertyChanged(nameof(TimeSpent));
 }
예제 #4
0
 public void Restart()
 {
     this.RegisterProtocol();
     var udpProtocol = new UDPProtocol { NearProtocol = this };
     UDPCarrier.Create("", 0, this);
     Session = DownloadSession = new DownloadSession(this);
     DownloadSession.Connect(Url);
     Status = "正在连接";
     StartTime = DateTime.Now;
     OnPropertyChanged(nameof(TimeSpent));
 }