summaryrefslogtreecommitdiff
path: root/qpid/cpp/examples
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2008-05-27 17:46:27 +0000
committerAlan Conway <aconway@apache.org>2008-05-27 17:46:27 +0000
commitef84bffee478085bd9997c057689f9f7bc322035 (patch)
treea1e6ab240af4f957972c775a443c89a9d1727088 /qpid/cpp/examples
parent4763224dc4a4c5d555748cc107bf3b6210c421aa (diff)
downloadqpid-python-ef84bffee478085bd9997c057689f9f7bc322035.tar.gz
Use symbolic constants for message flow values.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@660625 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/examples')
-rw-r--r--qpid/cpp/examples/examples/request-response/client.cpp4
-rw-r--r--qpid/cpp/examples/examples/request-response/server.cpp5
2 files changed, 4 insertions, 5 deletions
diff --git a/qpid/cpp/examples/examples/request-response/client.cpp b/qpid/cpp/examples/examples/request-response/client.cpp
index 7540de30ff..79bc88c6ae 100644
--- a/qpid/cpp/examples/examples/request-response/client.cpp
+++ b/qpid/cpp/examples/examples/request-response/client.cpp
@@ -79,8 +79,8 @@ void Listener::listen() {
session.messageSubscribe(arg::queue=destination_name, arg::destination=destination_name);
- session.messageFlow(arg::destination=destination_name, arg::unit=0, arg::value=1);//messages ### Define a constant?
- session.messageFlow(arg::destination=destination_name, arg::unit=1, arg::value=0xFFFFFFFF);//bytes ###### Define a constant?
+ session.messageFlow(arg::destination=destination_name, arg::unit=MESSAGE_CREDIT, arg::value=1);
+ session.messageFlow(arg::destination=destination_name, arg::unit=BYTE_CREDIT, arg::value=UNLIMITED_CREDIT);
dispatcher.listen(destination_name, this);
diff --git a/qpid/cpp/examples/examples/request-response/server.cpp b/qpid/cpp/examples/examples/request-response/server.cpp
index 1946facd0e..83144c715d 100644
--- a/qpid/cpp/examples/examples/request-response/server.cpp
+++ b/qpid/cpp/examples/examples/request-response/server.cpp
@@ -82,9 +82,8 @@ void Listener::listen() {
session.messageSubscribe(arg::queue=destination_name, arg::destination=destination_name);
- // ##### Should not be needed. Sigh.
- session.messageFlow(arg::destination=destination_name, arg::unit=0, arg::value=1);//messages ### Define a constant?
- session.messageFlow(arg::destination=destination_name, arg::unit=1, arg::value=0xFFFFFFFF);//bytes ###### Define a constant?
+ session.messageFlow(arg::destination=destination_name, arg::unit=MESSAGE_CREDIT, arg::value=1);
+ session.messageFlow(arg::destination=destination_name, arg::unit=BYTE_CREDIT, arg::value=UNLIMITED_CREDIT);
dispatcher.listen(destination_name, this);
}