diff options
| author | Gordon Sim <gsim@apache.org> | 2008-04-29 20:15:18 +0000 |
|---|---|---|
| committer | Gordon Sim <gsim@apache.org> | 2008-04-29 20:15:18 +0000 |
| commit | acc0dee435e1fa22e3b1e7cdfecf6913bf88988e (patch) | |
| tree | 729f7a03543acf23380e68897f8788a3e6b45e2e /cpp/src/qpid/client/Connection.h | |
| parent | a19ce3b1863f80c1232ec2690cd920325a39d71a (diff) | |
| download | qpid-python-acc0dee435e1fa22e3b1e7cdfecf6913bf88988e.tar.gz | |
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
Diffstat (limited to 'cpp/src/qpid/client/Connection.h')
| -rw-r--r-- | cpp/src/qpid/client/Connection.h | 25 |
1 files changed, 11 insertions, 14 deletions
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<ConnectionImpl> 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<Connector>); + 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. |
