summaryrefslogtreecommitdiff
path: root/qpid/cpp/tests/echo_service.cpp
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2007-03-21 19:12:14 +0000
committerAlan Conway <aconway@apache.org>2007-03-21 19:12:14 +0000
commitd66d50b103ab12df58132ce17ed5892df29b4b5c (patch)
tree0cdeb9f8365be75539e000f7e1d4a76387655b94 /qpid/cpp/tests/echo_service.cpp
parent6625d0c47f5252af8d64abce773583ec27f28116 (diff)
downloadqpid-python-d66d50b103ab12df58132ce17ed5892df29b4b5c.tar.gz
Refactored client side for dual-mode Channel supporting either 0-9 Message or 0-8 Basic.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@520972 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/tests/echo_service.cpp')
-rw-r--r--qpid/cpp/tests/echo_service.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/qpid/cpp/tests/echo_service.cpp b/qpid/cpp/tests/echo_service.cpp
index 412ffbeb58..ff11a336fe 100644
--- a/qpid/cpp/tests/echo_service.cpp
+++ b/qpid/cpp/tests/echo_service.cpp
@@ -116,7 +116,7 @@ int main(int argc, char** argv){
//Consume from the response queue, logging all echoed message to console:
LoggingListener listener;
std::string tag;
- channel.getBasic().consume(response, tag, &listener);
+ channel.consume(response, tag, &listener);
//Process incoming requests on a new thread
channel.start();
@@ -129,7 +129,7 @@ int main(int argc, char** argv){
Message msg;
msg.getHeaders().setString("RESPONSE_QUEUE", response.getName());
msg.setData(text);
- channel.getBasic().publish(msg, Exchange::STANDARD_DIRECT_EXCHANGE, echo_service);
+ channel.publish(msg, Exchange::STANDARD_DIRECT_EXCHANGE, echo_service);
std::cout << "Enter text to send:" << std::endl;
}
@@ -158,10 +158,10 @@ int main(int argc, char** argv){
//Consume from the request queue, echoing back all messages received to the client that sent them
EchoServer server(&channel);
std::string tag = "server_tag";
- channel.getBasic().consume(request, tag, &server);
+ channel.consume(request, tag, &server);
//Process incoming requests on the main thread
- channel.getBasic().run();
+ channel.run();
connection.close();
} catch(qpid::QpidError error) {
@@ -184,7 +184,7 @@ void EchoServer::received(Message& message)
std::cout << "Echoing " << message.getData() << " back to " << name << std::endl;
//'echo' the message back:
- channel->getBasic().publish(message, Exchange::STANDARD_DIRECT_EXCHANGE, name);
+ channel->publish(message, Exchange::STANDARD_DIRECT_EXCHANGE, name);
}
}