summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/client/ConnectionSettings.cpp
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2008-06-02 21:38:25 +0000
committerAlan Conway <aconway@apache.org>2008-06-02 21:38:25 +0000
commit3ff35b94f59f92bf33c8f4d29643c4ad899b4673 (patch)
treef45d78a5d4a03408e813cc1fc82f7ba749053d44 /cpp/src/qpid/client/ConnectionSettings.cpp
parent93aa60d35700a912d47719770f294135292359e6 (diff)
downloadqpid-python-3ff35b94f59f92bf33c8f4d29643c4ad899b4673.tar.gz
Separate option parsing from qpid::client::ClientSettings.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@662581 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/client/ConnectionSettings.cpp')
-rw-r--r--cpp/src/qpid/client/ConnectionSettings.cpp30
1 files changed, 3 insertions, 27 deletions
diff --git a/cpp/src/qpid/client/ConnectionSettings.cpp b/cpp/src/qpid/client/ConnectionSettings.cpp
index 26a11c3b9d..2de2f92e45 100644
--- a/cpp/src/qpid/client/ConnectionSettings.cpp
+++ b/cpp/src/qpid/client/ConnectionSettings.cpp
@@ -29,8 +29,7 @@
namespace qpid {
namespace client {
-ConnectionSettings::ConnectionSettings(const std::string& argv0) :
- Options("Connection Settings"),
+ConnectionSettings::ConnectionSettings() :
host("localhost"),
port(TcpAddress::DEFAULT_PORT),
clientid("cpp"),
@@ -42,34 +41,11 @@ ConnectionSettings::ConnectionSettings(const std::string& argv0) :
maxChannels(32767),
maxFrameSize(65535),
bounds(2),
- tcpNoDelay(false),
- log(argv0)
-{
- addOptions()
- ("broker,b", optValue(host, "HOST"), "Broker host to connect to")
- ("port,p", optValue(port, "PORT"), "Broker port to connect to")
- ("virtualhost,v", optValue(virtualhost, "VHOST"), "virtual host")
- ("clientname,n", optValue(clientid, "ID"), "unique client identifier")
- ("username", optValue(username, "USER"), "user name for broker log in.")
- ("password", optValue(password, "PASSWORD"), "password for broker log in.")
- ("mechanism", optValue(mechanism, "MECH"), "SASL mechanism to use when authenticating.")
- ("locale", optValue(locale, "LOCALE"), "locale to use.")
- ("max-channels", optValue(maxChannels, "N"), "the maximum number of channels the client requires.")
- ("max-frame-size", optValue(maxFrameSize, "N"), "the maximum frame size to request.")
- ("bounds-multiplier", optValue(bounds, "N"),
- "restricts the total size of outgoing frames queued up for writing (as a multiple of the max frame size).");
- add(log);
-}
+ tcpNoDelay(false)
+{}
ConnectionSettings::~ConnectionSettings() {}
-void ConnectionSettings::parse(int argc, char** argv)
-{
- qpid::Options::parse(argc, argv);
- qpid::log::Logger::instance().configure(log);
-}
-
-
void ConnectionSettings::configurePosixTcpSocket(int fd) const
{
if (tcpNoDelay) {