summaryrefslogtreecommitdiff
path: root/qpid/cpp/include
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2010-04-06 14:52:47 +0000
committerGordon Sim <gsim@apache.org>2010-04-06 14:52:47 +0000
commit331a2bea4eb38cbba44c82e7286c13b147b5519b (patch)
treede12d190e624420520d5212bd171979b4941bdeb /qpid/cpp/include
parentf17f0567c9a77afcb5d61afcfa8e3eb92fbd9c75 (diff)
downloadqpid-python-331a2bea4eb38cbba44c82e7286c13b147b5519b.tar.gz
QPID-664: added param to control synchronous send and acknowledge
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@931170 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/include')
-rw-r--r--qpid/cpp/include/qpid/messaging/Sender.h9
-rw-r--r--qpid/cpp/include/qpid/messaging/Session.h5
2 files changed, 11 insertions, 3 deletions
diff --git a/qpid/cpp/include/qpid/messaging/Sender.h b/qpid/cpp/include/qpid/messaging/Sender.h
index 66a7b1fe37..7c4b68731e 100644
--- a/qpid/cpp/include/qpid/messaging/Sender.h
+++ b/qpid/cpp/include/qpid/messaging/Sender.h
@@ -45,9 +45,14 @@ class Sender : public qpid::messaging::Handle<SenderImpl>
QPID_CLIENT_EXTERN Sender& operator=(const Sender&);
/**
- * Sends a message; will block if the pending == capacity
+ * Sends a message
+ *
+ * @param message the message to send
+ * @param sync if true the call will block until the server
+ * confirms receipt of the messages; if false will only block for
+ * available capacity (i.e. pending == capacity)
*/
- QPID_CLIENT_EXTERN void send(const Message& message);
+ QPID_CLIENT_EXTERN void send(const Message& message, bool sync=false);
QPID_CLIENT_EXTERN void close();
/**
diff --git a/qpid/cpp/include/qpid/messaging/Session.h b/qpid/cpp/include/qpid/messaging/Session.h
index 66a4937e6b..9b373e2d8b 100644
--- a/qpid/cpp/include/qpid/messaging/Session.h
+++ b/qpid/cpp/include/qpid/messaging/Session.h
@@ -71,8 +71,11 @@ class Session : public qpid::messaging::Handle<SessionImpl>
/**
* Acknowledges all outstanding messages that have been received
* by the application on this session.
+ *
+ * @param sync if true, blocks until the acknowledgement has been
+ * processed by the server
*/
- QPID_CLIENT_EXTERN void acknowledge();
+ QPID_CLIENT_EXTERN void acknowledge(bool sync=false);
/**
* Rejects the specified message. This will prevent the message
* being redelivered.