public static string GetHexDump(ByteBuffer input) { int size = input.Remaining; if (size == 0) { return "empty"; } StringBuilder output = new StringBuilder(size * 3 - 1); byte[] data = input.Array; int byteValue = data[0] & 0xFF; output.Append((char) highDigits[byteValue]); output.Append((char) lowDigits[byteValue]); for (int i = 1 ; i < size; i++) { output.Append(' '); byteValue = data[i] & 0xFF; output.Append((char) highDigits[byteValue]); output.Append((char) lowDigits[byteValue]); } return output.ToString(); }
protected override void WriteMethodPayload(ByteBuffer buffer) { EncodingUtils.WriteShortStringBytes(buffer, Queue); buffer.Put(MessageCount); buffer.Put(ConsumerCount); }
protected override void WriteMethodPayload(ByteBuffer buffer) { EncodingUtils.WriteShortStringBytes(buffer, String1); EncodingUtils.WriteLongstr(buffer, String2); buffer.Put(Operation); }
protected override void PopulateMethodBodyFromBuffer(ByteBuffer buffer) { String1 = EncodingUtils.ReadShortString(buffer); String2 = EncodingUtils.ReadLongstr(buffer); Operation = buffer.GetByte(); }
protected override void WriteMethodPayload(ByteBuffer buffer) { EncodingUtils.WriteShortStringBytes(buffer, Exchange); EncodingUtils.WriteShortStringBytes(buffer, RoutingKey); EncodingUtils.WriteShortStringBytes(buffer, Queue); }
protected override void PopulateMethodBodyFromBuffer(ByteBuffer buffer) { Exchange = EncodingUtils.ReadShortString(buffer); RoutingKey = EncodingUtils.ReadShortString(buffer); Queue = EncodingUtils.ReadShortString(buffer); }
protected override void PopulateMethodBodyFromBuffer(ByteBuffer buffer) { Table = EncodingUtils.ReadFieldTable(buffer); IntegerOp = buffer.GetByte(); StringOp = buffer.GetByte(); }
protected override void WriteMethodPayload(ByteBuffer buffer) { buffer.Put(Ticket); EncodingUtils.WriteShortStringBytes(buffer, Queue); EncodingUtils.WriteBooleans(buffer, new bool[]{NoAck}); }
protected override void WriteMethodPayload(ByteBuffer buffer) { EncodingUtils.WriteFieldTableBytes(buffer, Table); buffer.Put(IntegerOp); buffer.Put(StringOp); }
protected override void PopulateMethodBodyFromBuffer(ByteBuffer buffer) { PrefetchSize = buffer.GetUInt32(); PrefetchCount = buffer.GetUInt16(); bool[] bools = EncodingUtils.ReadBooleans(buffer);Global = bools[0]; }
protected override void WriteMethodPayload(ByteBuffer buffer) { buffer.Put(PrefetchSize); buffer.Put(PrefetchCount); EncodingUtils.WriteBooleans(buffer, new bool[]{Global}); }
protected override void PopulateMethodBodyFromBuffer(ByteBuffer buffer) { Queue = EncodingUtils.ReadShortString(buffer); MessageCount = buffer.GetUInt32(); ConsumerCount = buffer.GetUInt32(); }
protected override void PopulateMethodBodyFromBuffer(ByteBuffer buffer) { ReplyCode = buffer.GetUInt16(); ReplyText = EncodingUtils.ReadShortString(buffer); Details = EncodingUtils.ReadFieldTable(buffer); }
protected override void WriteMethodPayload(ByteBuffer buffer) { EncodingUtils.WriteShortStringBytes(buffer, VirtualHost); EncodingUtils.WriteShortStringBytes(buffer, Capabilities); EncodingUtils.WriteBooleans(buffer, new bool[]{Insist}); }
public void WritePayload(ByteBuffer buffer) { foreach (IDataBlock block in _blocks) { block.WritePayload(buffer); } }
protected override void WriteMethodPayload(ByteBuffer buffer) { buffer.Put(ReplyCode); EncodingUtils.WriteShortStringBytes(buffer, ReplyText); EncodingUtils.WriteFieldTableBytes(buffer, Details); }
protected override void WriteMethodPayload(ByteBuffer buffer) { buffer.Put(ChannelMax); buffer.Put(FrameMax); buffer.Put(Heartbeat); }
protected override void PopulateMethodBodyFromBuffer(ByteBuffer buffer) { ChannelMax = buffer.GetUInt16(); FrameMax = buffer.GetUInt32(); Heartbeat = buffer.GetUInt16(); }
protected override void WriteMethodPayload(ByteBuffer buffer) { buffer.Put(Ticket); EncodingUtils.WriteShortStringBytes(buffer, Exchange); EncodingUtils.WriteBooleans(buffer, new bool[]{IfUnused, Nowait}); }
protected override void PopulateMethodBodyFromBuffer(ByteBuffer buffer) { Ticket = buffer.GetUInt16(); Queue = EncodingUtils.ReadShortString(buffer); bool[] bools = EncodingUtils.ReadBooleans(buffer);Nowait = bools[0]; }
protected override void PopulateMethodBodyFromBuffer(ByteBuffer buffer) { VirtualHost = EncodingUtils.ReadShortString(buffer); Capabilities = EncodingUtils.ReadShortString(buffer); bool[] bools = EncodingUtils.ReadBooleans(buffer);Insist = bools[0]; }
protected override void WriteMethodPayload(ByteBuffer buffer) { EncodingUtils.WriteFieldTableBytes(buffer, ClientProperties); EncodingUtils.WriteShortStringBytes(buffer, Mechanism); EncodingUtils.WriteLongstr(buffer, Response); EncodingUtils.WriteShortStringBytes(buffer, Locale); }
protected override void WriteMethodPayload(ByteBuffer buffer) { buffer.Put(Ticket); EncodingUtils.WriteShortStringBytes(buffer, Exchange); EncodingUtils.WriteShortStringBytes(buffer, RoutingKey); EncodingUtils.WriteBooleans(buffer, new bool[]{Mandatory, Immediate}); }
public void WritePayload(ByteBuffer buffer) { if (Payload != null) { buffer.Put(Payload); Payload.Rewind(); } }
protected override void PopulateMethodBodyFromBuffer(ByteBuffer buffer) { ReplyCode = buffer.GetUInt16(); ReplyText = EncodingUtils.ReadShortString(buffer); ClassId = buffer.GetUInt16(); MethodId = buffer.GetUInt16(); }
protected override void WriteMethodPayload(ByteBuffer buffer) { buffer.Put(ReplyCode); EncodingUtils.WriteShortStringBytes(buffer, ReplyText); buffer.Put(ClassId); buffer.Put(MethodId); }
protected override void WriteMethodPayload(ByteBuffer buffer) { buffer.Put(Ticket); EncodingUtils.WriteShortStringBytes(buffer, Queue); EncodingUtils.WriteBooleans(buffer, new bool[]{Passive, Durable, Exclusive, AutoDelete, Nowait}); EncodingUtils.WriteFieldTableBytes(buffer, Arguments); }
protected override void WriteMethodPayload(ByteBuffer buffer) { buffer.Put(ReplyCode); EncodingUtils.WriteShortStringBytes(buffer, ReplyText); EncodingUtils.WriteShortStringBytes(buffer, Exchange); EncodingUtils.WriteShortStringBytes(buffer, RoutingKey); }
protected override void PopulateMethodBodyFromBuffer(ByteBuffer buffer) { ReplyCode = buffer.GetUInt16(); ReplyText = EncodingUtils.ReadShortString(buffer); Exchange = EncodingUtils.ReadShortString(buffer); RoutingKey = EncodingUtils.ReadShortString(buffer); }
protected override void PopulateMethodBodyFromBuffer(ByteBuffer buffer) { ClientProperties = EncodingUtils.ReadFieldTable(buffer); Mechanism = EncodingUtils.ReadShortString(buffer); Response = EncodingUtils.ReadLongstr(buffer); Locale = EncodingUtils.ReadShortString(buffer); }