Inheritance: BaseRtmfpProtocol
コード例 #1
0
ファイル: Middle.cs プロジェクト: langhuihui/csharprtmp
 public Middle(Peer peer, byte[] decryptKey, byte[] encryptKey, Target target)
     : base(peer, decryptKey, encryptKey)
 {
     QueryUrl = "rtmfp://202.109.143.196:555/live2";
     _outboundRtmfpProtocol = new OutboundRTMFPProtocol();
     _outboundRtmfpProtocol.OnConnect += () =>
     {
         foreach (var memoryStream in _buffer)
         {
            
             _outboundRtmfpProtocol.Session.SendStream(memoryStream,(int) memoryStream.Length);
         }
     };
     _outboundRtmfpProtocol.Session = new MiddleHandshake(_outboundRtmfpProtocol) { MiddleSession = this };
     _outboundRtmfpProtocol.Session.Connect(QueryUrl);
 }
コード例 #2
0
 public Middle(Peer peer, byte[] decryptKey, byte[] encryptKey, Target target)
     : base(peer, decryptKey, encryptKey)
 {
     QueryUrl = "rtmfp://202.109.143.196:555/live2";
     _outboundRtmfpProtocol            = new OutboundRTMFPProtocol();
     _outboundRtmfpProtocol.OnConnect += () =>
     {
         foreach (var memoryStream in _buffer)
         {
             _outboundRtmfpProtocol.Session.SendStream(memoryStream, (int)memoryStream.Length);
         }
     };
     _outboundRtmfpProtocol.Session = new MiddleHandshake(_outboundRtmfpProtocol)
     {
         MiddleSession = this
     };
     _outboundRtmfpProtocol.Session.Connect(QueryUrl);
 }