summaryrefslogtreecommitdiff
path: root/qpid/cpp/examples/messaging/client.cpp
diff options
context:
space:
mode:
authorJonathan Robie <jonathan@apache.org>2010-09-14 21:19:42 +0000
committerJonathan Robie <jonathan@apache.org>2010-09-14 21:19:42 +0000
commitd16e68ff247f3a67f3854d64abf8c685386faadc (patch)
tree4dfbb52fd94d0e81b4cb534372d5834bc7a723b5 /qpid/cpp/examples/messaging/client.cpp
parentf2b8ca996716d3231d66e32b3fbab4edd40a3095 (diff)
downloadqpid-python-d16e68ff247f3a67f3854d64abf8c685386faadc.tar.gz
Adds a parameter to several examples to allow connection options to be specified.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@997099 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/examples/messaging/client.cpp')
-rw-r--r--qpid/cpp/examples/messaging/client.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/qpid/cpp/examples/messaging/client.cpp b/qpid/cpp/examples/messaging/client.cpp
index 483e5f8744..f0ecd96206 100644
--- a/qpid/cpp/examples/messaging/client.cpp
+++ b/qpid/cpp/examples/messaging/client.cpp
@@ -38,9 +38,10 @@ using std::string;
int main(int argc, char** argv) {
const char* url = argc>1 ? argv[1] : "amqp:tcp:127.0.0.1:5672";
-
- Connection connection(url);
- try {
+ std::string connectionOptions = argc > 2 ? argv[2] : "";
+
+ Connection connection(url, connectionOptions);
+ try {
connection.open();
Session session = connection.createSession();