CSharpRTMP.Core.Protocols.Rtmfp.Middle.PacketHandler C# (CSharp) Method

PacketHandler() public method

public PacketHandler ( N2HBinaryReader reader ) : void
reader CSharpRTMP.Common.N2HBinaryReader
return void
        public override void PacketHandler(N2HBinaryReader reader)
        {
            reader.BaseStream.Position = 0;
            var ms = new MemoryStream();
            reader.BaseStream.CopyPartTo(ms, (int)reader.BaseStream.GetAvaliableByteCounts());
            ms.Position = 6;
            if (_outboundRtmfpProtocol.Session.Checked)
            {
                _outboundRtmfpProtocol.Session.SendStream(ms, (int)ms.Length);
            }
            else
            {
                _buffer.Add(ms);
            }
        }
    }