public void WriteMessage(RabbitMQMainInfo message, IBufferWriter <byte> output) { ValueWriter writer = new ValueWriter(output); FrameWriter.WriteFrameHeader(1, 0, 12, ref writer); FrameWriter.WriteMethodFrame(10, 31, ref writer); writer.WriteShortInt(message.ChannelMax); writer.WriteLong(message.FrameMax); writer.WriteShortInt(message.Heartbeat); writer.WriteOctet(206); writer.Commit(); }
public void WriteMessage(QoSInfo message, IBufferWriter <byte> output) { ValueWriter writer = new ValueWriter(output); FrameWriter.WriteFrameHeader(1, _channel, 11, ref writer); FrameWriter.WriteMethodFrame(60, 10, ref writer); writer.WriteLong(message.PrefetchSize); writer.WriteShortInt(message.PrefetchCount); writer.WriteBool(message.Global); writer.WriteOctet(RabbitMQConstants.FrameEnd); writer.Commit(); }