summaryrefslogtreecommitdiff
path: root/cpp/examples/messaging/topic_receiver.cpp
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2010-04-08 09:49:04 +0000
committerGordon Sim <gsim@apache.org>2010-04-08 09:49:04 +0000
commita62b3c4f125306ceec23175b9c7aef2786ee786c (patch)
treef7aeeba9df178aabc896a118464fc2044e53aa6a /cpp/examples/messaging/topic_receiver.cpp
parentbe01dfd2d74634abf3387e8eb363d2c90b31cf0d (diff)
downloadqpid-python-a62b3c4f125306ceec23175b9c7aef2786ee786c.tar.gz
QPID-664: changed open() to connect(), moved url parameter to constructor, added detach() and isConnected()
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@931852 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/examples/messaging/topic_receiver.cpp')
-rw-r--r--cpp/examples/messaging/topic_receiver.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/cpp/examples/messaging/topic_receiver.cpp b/cpp/examples/messaging/topic_receiver.cpp
index df2484adfb..408920f5aa 100644
--- a/cpp/examples/messaging/topic_receiver.cpp
+++ b/cpp/examples/messaging/topic_receiver.cpp
@@ -33,9 +33,9 @@ int main(int argc, char** argv) {
const std::string url = argc>1 ? argv[1] : "amqp:tcp:127.0.0.1:5672";
const std::string pattern = argc>2 ? argv[2] : "#.#";
- Connection connection;
+ Connection connection(url);
try {
- connection.open(url);
+ connection.connect();
Session session = connection.createSession();
Receiver receiver = session.createReceiver("news_service; {filter:[control, " + pattern + "]}");
while (true) {