summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/framing/AMQFrame.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/qpid/framing/AMQFrame.cpp')
-rw-r--r--cpp/src/qpid/framing/AMQFrame.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/cpp/src/qpid/framing/AMQFrame.cpp b/cpp/src/qpid/framing/AMQFrame.cpp
index c1fc647b52..662b3574ff 100644
--- a/cpp/src/qpid/framing/AMQFrame.cpp
+++ b/cpp/src/qpid/framing/AMQFrame.cpp
@@ -45,6 +45,13 @@ uint32_t AMQFrame::frameOverhead() {
return 12 /*frame header*/;
}
+uint16_t AMQFrame::DECODE_SIZE_MIN=4;
+
+uint16_t AMQFrame::decodeSize(char* data) {
+ Buffer buf(data+2, DECODE_SIZE_MIN);
+ return buf.getShort();
+}
+
void AMQFrame::encode(Buffer& buffer) const
{
//set track first (controls on track 0, everything else on 1):