CSharpRTMP.Core.Protocols.Rtmfp.OutboundHandshake.Flush C# (CSharp) Method

Flush() public method

public Flush ( byte type ) : void
type byte
return void
        public override void Flush(byte type)
        {
            Writer.BaseStream.Position = 6;
            Writer.Write((byte)0x0b);
            Writer.Write(RtmfpUtils.TimeNow());
            Writer.Write(type);
            Writer.Write((short)(Writer.BaseStream.GetAvaliableByteCounts() - 2));
            var encoder = AesEncrypt.Next(AESEngine.AESType.SYMMETRIC);
            RtmfpUtils.EncodeAndPack(encoder, Writer, 0);
            EnqueueForOutbound(OutputBuffer);
            Writer.Clear(11);
        }