From 98ccae7574a18f8d0a1f9e28e86ccfde4541c81f Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Tue, 30 Jan 2007 18:20:00 +0000 Subject: * client/* framing/*: fixed client-side request ID processing. * cpp/tests/InProcessBroker.h: For tests: connect to an in-process broker directly, bypass the network. Keeps log of client/broker conversation for verification in test code. * cpp/tests/FramingTest.cpp (testRequestResponseRoundtrip): Client/broker round-trip test for request/reponse IDs and response mark. * APRAcceptor.cpp (APRAcceptor): fixed valgrind uninitialized error. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/branches/qpid.0-9@501502 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/lib/client/Connection.h | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) (limited to 'cpp/lib/client/Connection.h') diff --git a/cpp/lib/client/Connection.h b/cpp/lib/client/Connection.h index 6ee9e62e47..6a9a76eed2 100644 --- a/cpp/lib/client/Connection.h +++ b/cpp/lib/client/Connection.h @@ -1,5 +1,5 @@ -#ifndef _Connection_ -#define _Connection_ +#ifndef _client_Connection_ +#define _client_Connection_ /* * @@ -89,19 +89,19 @@ class Connection : public ConnectionForChannel static framing::ChannelId channelIdCounter; static const std::string OK; - std::string host; - int port; + framing::ProtocolVersion version; const u_int32_t max_frame_size; - ChannelMap channels; + ChannelMap channels; + Connector defaultConnector; Connector* connector; framing::OutputHandler* out; - volatile bool closed; - framing::ProtocolVersion version; + volatile bool isOpen; void erase(framing::ChannelId); void channelException( Channel&, framing::AMQMethodBody*, const QpidError&); Channel channel0; + bool debug; // TODO aconway 2007-01-26: too many friendships, untagle these classes. friend class Channel; @@ -145,10 +145,10 @@ class Connection : public ConnectionForChannel * within a single broker). */ void open(const std::string& host, int port = 5672, - const std::string& uid = "guest", const std::string& pwd = "guest", + const std::string& uid = "guest", + const std::string& pwd = "guest", const std::string& virtualhost = "/"); - /** * Close the connection with optional error information for the peer. * @@ -177,7 +177,10 @@ class Connection : public ConnectionForChannel void idleOut(); void idleIn(); void shutdown(); - + + /**\internal used for testing */ + void setConnector(Connector& connector); + /** * @return the maximum frame size in use on this connection */ @@ -187,8 +190,7 @@ class Connection : public ConnectionForChannel const framing::ProtocolVersion& getVersion() { return version; } }; -} -} +}} // namespace qpid::client #endif -- cgit v1.2.1