summaryrefslogtreecommitdiff
path: root/cpp/lib/client/Connection.h
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2007-01-30 18:20:00 +0000
committerAlan Conway <aconway@apache.org>2007-01-30 18:20:00 +0000
commit98ccae7574a18f8d0a1f9e28e86ccfde4541c81f (patch)
tree528fe0c686b9193e66bdd222d0aee6c4705f34e7 /cpp/lib/client/Connection.h
parent53d097bd7e565d08f902671180be58d4b2a9d843 (diff)
downloadqpid-python-98ccae7574a18f8d0a1f9e28e86ccfde4541c81f.tar.gz
* 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
Diffstat (limited to 'cpp/lib/client/Connection.h')
-rw-r--r--cpp/lib/client/Connection.h26
1 files changed, 14 insertions, 12 deletions
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