public static Header VH(byte ht,uint cid,uint ts,uint ml,byte mt,uint si,bool ia) { var header = new Header(); header.Reset(ht,cid,ts,ml,mt,si,ia); return header; }
//public override bool AllowNearProtocol(ulong type) //{ // Logger.FATAL("This protocol doesn't allow any near protocols"); // return false; //} //public override bool AllowFarProtocol(ulong type) //{ // return type == ProtocolTypes.PT_TCP || type == ProtocolTypes.PT_RTMPE || type == ProtocolTypes.PT_INBOUND_SSL || // type == ProtocolTypes.PT_INBOUND_HTTP_FOR_RTMP; //} public void ChunkAmfMessage( Header header,BufferWithOffset input, MemoryStream output) { var channel = GetChannel(header.ChannelId); long available; while ((available = input.Length) != 0) { header.Write(channel, output); if (available > _outboundChunkSize) { available = _outboundChunkSize; } output.Write(input.Buffer, input.Offset, (int)available); channel.lastOutProcBytes += (uint)available; input.Offset += (int)available; } channel.lastOutProcBytes = 0; }