From 3a87c67be419a3ae74ea456ae67be5d0f2d2ec92 Mon Sep 17 00:00:00 2001 From: Gordon Sim Date: Wed, 9 May 2007 17:00:32 +0000 Subject: * Added support for channel.flow: cpp/tests/ChannelTest.cpp cpp/lib/broker/SessionHandlerImpl.cpp cpp/lib/broker/BrokerChannel.h cpp/lib/broker/BrokerChannel.cpp * Fixed client connection closing process: cpp/lib/common/sys/apr/Socket.cpp cpp/lib/client/Connector.h cpp/lib/client/Connector.cpp cpp/lib/client/Connection.h cpp/lib/client/Connection.cpp * Use amq.direct rather than default exchange in P2P test (to interop with java) cpp/tests/BasicP2Ptest.h git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/branches/M2@536584 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/lib/client/Connection.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'cpp/lib/client/Connection.cpp') diff --git a/cpp/lib/client/Connection.cpp b/cpp/lib/client/Connection.cpp index ad8aa1d0dd..f7897aa4df 100644 --- a/cpp/lib/client/Connection.cpp +++ b/cpp/lib/client/Connection.cpp @@ -30,9 +30,11 @@ using namespace qpid::framing; using namespace qpid::sys; using namespace qpid::sys; -u_int16_t Connection::channelIdCounter; - -Connection::Connection( bool debug, u_int32_t _max_frame_size, qpid::framing::ProtocolVersion* _version) : max_frame_size(_max_frame_size), closed(true), +Connection::Connection( bool _debug, u_int32_t _max_frame_size, qpid::framing::ProtocolVersion* _version) : + debug(_debug), + channelIdCounter(0), + max_frame_size(_max_frame_size), + closed(true), version(_version->getMajor(),_version->getMinor()) { connector = new Connector(version, debug, _max_frame_size); @@ -96,7 +98,7 @@ void Connection::open(const std::string& _host, int _port, const std::string& ui }else{ THROW_QPID_ERROR(PROTOCOL_ERROR, "Bad response"); } - + closed = false; } void Connection::close(){ @@ -108,6 +110,7 @@ void Connection::close(){ sendAndReceive(new AMQFrame(version, 0, new ConnectionCloseBody(version, code, text, classId, methodId)), method_bodies.connection_close_ok); connector->close(); + closed = true; } } -- cgit v1.2.1