summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp')
-rw-r--r--cpp/examples/examples/request-response/client.cpp4
-rw-r--r--cpp/examples/examples/request-response/server.cpp5
-rw-r--r--cpp/src/qpid/client/SessionBase_0_10.h2
3 files changed, 5 insertions, 6 deletions
diff --git a/cpp/examples/examples/request-response/client.cpp b/cpp/examples/examples/request-response/client.cpp
index 7540de30ff..79bc88c6ae 100644
--- a/cpp/examples/examples/request-response/client.cpp
+++ b/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/cpp/examples/examples/request-response/server.cpp b/cpp/examples/examples/request-response/server.cpp
index 1946facd0e..83144c715d 100644
--- a/cpp/examples/examples/request-response/server.cpp
+++ b/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);
}
diff --git a/cpp/src/qpid/client/SessionBase_0_10.h b/cpp/src/qpid/client/SessionBase_0_10.h
index f9ced049a9..e5d2b19327 100644
--- a/cpp/src/qpid/client/SessionBase_0_10.h
+++ b/cpp/src/qpid/client/SessionBase_0_10.h
@@ -48,7 +48,7 @@ using framing::SequenceNumberSet;
using qpid::SessionId;
using framing::Xid;
-enum CreditUnit { MESSAGE=0, BYTE=1 };
+enum CreditUnit { MESSAGE_CREDIT=0, BYTE_CREDIT=1, UNLIMITED_CREDIT=0xFFFFFFFF };
/**
* Base class for handles to an AMQP session.