From acc0dee435e1fa22e3b1e7cdfecf6913bf88988e Mon Sep 17 00:00:00 2001 From: Gordon Sim Date: Tue, 29 Apr 2008 20:15:18 +0000 Subject: QPID-974: allow the size of the queue of outgoing frames to be restricted QPID-544: tidy up configuration (ensuring desired settings are used correctly, allowing tcp socket options to be set etc) git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@652083 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/client/Connection.h | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) (limited to 'cpp/src/qpid/client/Connection.h') diff --git a/cpp/src/qpid/client/Connection.h b/cpp/src/qpid/client/Connection.h index 0ddd383381..417739fd1d 100644 --- a/cpp/src/qpid/client/Connection.h +++ b/cpp/src/qpid/client/Connection.h @@ -39,6 +39,7 @@ namespace qpid { */ namespace client { +class ConnectionSettings; /** * \defgroup clientapi Application API for an AMQP client. */ @@ -54,9 +55,7 @@ class Connection { framing::ChannelId channelIdCounter; framing::ProtocolVersion version; - const uint32_t max_frame_size; - bool isOpen; - bool debug; + uint16_t max_frame_size; protected: boost::shared_ptr impl; @@ -67,17 +66,8 @@ class Connection * connection. * * @param _version the version of the protocol to connect with. - * - * @param debug turns on tracing for the connection - * (i.e. prints details of the frames sent and received to std - * out). Optional. Defaults to false. - * - * @param max_frame_size the maximum frame size that the - * client will accept. Optional. Defaults to 65535. */ - Connection(bool debug = false, uint32_t max_frame_size = 65535, - framing::ProtocolVersion=framing::highestProtocolVersion); - Connection(boost::shared_ptr); + Connection(framing::ProtocolVersion=framing::highestProtocolVersion); ~Connection(); /** @@ -100,7 +90,14 @@ class Connection void open(const std::string& host, int port = 5672, const std::string& uid = "guest", const std::string& pwd = "guest", - const std::string& virtualhost = "/"); + const std::string& virtualhost = "/", uint16_t maxFrameSize=65535); + + /** + * Opens a connection to a broker. + * + * @param the settings to use (host, port etc) @see ConnectionSettings + */ + void open(const ConnectionSettings& settings); /** * Close the connection. -- cgit v1.2.1