From a179ded965c5cc70a0666d07737c38c67c1558c1 Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Mon, 2 Mar 2009 23:30:08 +0000 Subject: Replicate connection decoder fragments to new members. Refactoring: - Merge Decoder into ConnectionMap. - Process cluster controls in event queue thread. - Use counter not pointer for connection ID, avoid re-use. - Do all processing in event queue thread to avoid races (temporary pending performance measurements) git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@749473 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/framing/FrameDecoder.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'cpp/src/qpid/framing/FrameDecoder.cpp') diff --git a/cpp/src/qpid/framing/FrameDecoder.cpp b/cpp/src/qpid/framing/FrameDecoder.cpp index cbdac181e9..6f0ae9756f 100644 --- a/cpp/src/qpid/framing/FrameDecoder.cpp +++ b/cpp/src/qpid/framing/FrameDecoder.cpp @@ -21,8 +21,9 @@ #include "FrameDecoder.h" #include "Buffer.h" #include "qpid/log/Statement.h" -#include #include "qpid/framing/reply_exceptions.h" +#include +#include namespace qpid { namespace framing { @@ -67,4 +68,13 @@ bool FrameDecoder::decode(Buffer& buffer) { return false; } +void FrameDecoder::setFragment(const char* data, size_t size) { + fragment.resize(size); + ::memcpy(fragment.data(), data, size); +} + +std::pair FrameDecoder::getFragment() const { + return std::pair(fragment.data(), fragment.size()); +} + }} // namespace qpid::framing -- cgit v1.2.1