From 43393128c074be68dab06b6097072e62546689de Mon Sep 17 00:00:00 2001 From: Jonathan Robie Date: Tue, 14 Sep 2010 21:19:42 +0000 Subject: Adds a parameter to several examples to allow connection options to be specified. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@997099 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/examples/messaging/client.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'cpp/examples/messaging/client.cpp') diff --git a/cpp/examples/messaging/client.cpp b/cpp/examples/messaging/client.cpp index 483e5f8744..f0ecd96206 100644 --- a/cpp/examples/messaging/client.cpp +++ b/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(); -- cgit v1.2.1