From 4780580874e8d6a3e3590fa5fdf8a088310b20ae Mon Sep 17 00:00:00 2001 From: Gordon Sim Date: Sun, 20 Apr 2008 12:10:37 +0000 Subject: QPID-920: converted c++ client to use final 0-10 protocol * connection handler converted to using invoker & proxy and updated to final method defs * SessionCore & ExecutionHandler replace by SessionImpl * simplified handling of completion & results, removed handling of responses git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@649915 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/cpp/src/tests/latencytest.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'qpid/cpp/src/tests/latencytest.cpp') diff --git a/qpid/cpp/src/tests/latencytest.cpp b/qpid/cpp/src/tests/latencytest.cpp index 2b44a5477a..a61a4b2e42 100644 --- a/qpid/cpp/src/tests/latencytest.cpp +++ b/qpid/cpp/src/tests/latencytest.cpp @@ -192,7 +192,7 @@ Receiver::Receiver(const string& q, Stats& s) : Client(q), mgr(session), count(0 mgr.setAckPolicy(AckPolicy(opts.ack ? opts.ack : (opts.prefetch / 2))); mgr.setFlowControl(opts.prefetch, SubscriptionManager::UNLIMITED, true); } else { - mgr.setConfirmMode(false); + mgr.setAcceptMode(1/*not-required*/); mgr.setFlowControl(SubscriptionManager::UNLIMITED, SubscriptionManager::UNLIMITED, false); } mgr.subscribe(*this, queue); @@ -257,14 +257,13 @@ void Sender::sendByCount() msg.getDeliveryProperties().setDeliveryMode(framing::PERSISTENT); } - Completion c; for (uint i = 0; i < opts.count; i++) { uint64_t sentAt(current_time()); msg.getDeliveryProperties().setTimestamp(sentAt); //msg.getHeaders().setTimestamp("sent-at", sentAt);//TODO add support for uint64_t to field tables - c = session.messageTransfer(arg::content=msg); + session.messageTransfer(arg::content=msg, arg::acceptMode=1); } - c.sync(); + session.sync(); } void Sender::sendByRate() @@ -283,7 +282,7 @@ void Sender::sendByRate() uint64_t sentAt(current_time()); msg.getDeliveryProperties().setTimestamp(sentAt); //msg.getHeaders().setTimestamp("sent-at", sentAt);//TODO add support for uint64_t to field tables - session.messageTransfer(arg::content=msg); + session.messageTransfer(arg::content=msg, arg::acceptMode=1); } uint64_t timeTaken = (current_time() - start) / TIME_USEC; if (timeTaken < 1000) { -- cgit v1.2.1