Ejemplo n.º 1
0
        void WriteContentHeaderFrame(ref CustomBufferWriter <PipeWriter> writer, MessageProperties properties, ulong length)
        {
            var payloadSizeHeader = writer.WriteFrameHeader(FrameType.ContentHeader, channelNumber);

            writer.Commit();
            var bytesWrittenBefore = (uint)writer.BytesCommitted;

            writer.Write(ClassId.Basic);
            writer.Write(Reserved);
            writer.Write(Reserved);
            writer.Write(length);
            writer.WriteBasicProperties(properties);

            writer.Commit();
            BinaryPrimitives.WriteUInt32BigEndian(payloadSizeHeader, ((uint)writer.BytesCommitted - bytesWrittenBefore));

            writer.Write(FrameEnd);
        }