diff options
author | Carl C. Trieloff <cctrieloff@apache.org> | 2006-12-20 22:29:38 +0000 |
---|---|---|
committer | Carl C. Trieloff <cctrieloff@apache.org> | 2006-12-20 22:29:38 +0000 |
commit | 47081948f3e2d930c2564e5a2fad5ad3012659ac (patch) | |
tree | d71ec6e1b86b377c01260e4ebc9c8fd2bafd4d1d /qpid/cpp/lib/client/Connection.cpp | |
parent | 7b53aee0497f9a0479856c1a1f0e186961f6b6c7 (diff) | |
download | qpid-python-47081948f3e2d930c2564e5a2fad5ad3012659ac.tar.gz |
Support for multi version, merge part 1. - can still refactor out dup use of
version object in client and server opperations.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@489212 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/lib/client/Connection.cpp')
-rw-r--r-- | qpid/cpp/lib/client/Connection.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/qpid/cpp/lib/client/Connection.cpp b/qpid/cpp/lib/client/Connection.cpp index 9c81192573..78aeafb37b 100644 --- a/qpid/cpp/lib/client/Connection.cpp +++ b/qpid/cpp/lib/client/Connection.cpp @@ -32,10 +32,8 @@ using namespace qpid::sys; u_int16_t Connection::channelIdCounter; -Connection::Connection(bool debug, u_int32_t _max_frame_size) : max_frame_size(_max_frame_size), closed(true), -// AMQP version management change - kpvdr 2006-11-20 -// TODO: Make this class version-aware and link these hard-wired numbers to that version - version(8, 0) +Connection::Connection( bool debug, u_int32_t _max_frame_size, qpid::framing::ProtocolVersion* _version) : max_frame_size(_max_frame_size), closed(true), + version(_version->getMajor(),_version->getMinor()) { connector = new Connector(debug, _max_frame_size); } @@ -53,7 +51,7 @@ void Connection::open(const std::string& _host, int _port, const std::string& ui out = connector->getOutputHandler(); connector->connect(host, port); - ProtocolInitiation* header = new ProtocolInitiation(8, 0); + ProtocolInitiation* header = new ProtocolInitiation(version); responses.expect(); connector->init(header); responses.receive(method_bodies.connection_start); |