summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/cluster/Multicaster.cpp
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2008-12-12 15:23:39 +0000
committerAlan Conway <aconway@apache.org>2008-12-12 15:23:39 +0000
commitc3a95e5db514598ecf0a543ceccd4e4a4084ca39 (patch)
tree6cf3b6bfcd5f60760098424c9782fe6bd680a287 /cpp/src/qpid/cluster/Multicaster.cpp
parent3ff85ea13d228f4f548c98d0c72219ec5faff552 (diff)
downloadqpid-python-c3a95e5db514598ecf0a543ceccd4e4a4084ca39.tar.gz
cluster/Event: store event header in the same buffer as data to simplify encoding.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@726043 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/cluster/Multicaster.cpp')
-rw-r--r--cpp/src/qpid/cluster/Multicaster.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/cpp/src/qpid/cluster/Multicaster.cpp b/cpp/src/qpid/cluster/Multicaster.cpp
index 896f7c6a6e..37d2f81b39 100644
--- a/cpp/src/qpid/cluster/Multicaster.cpp
+++ b/cpp/src/qpid/cluster/Multicaster.cpp
@@ -57,10 +57,13 @@ void Multicaster::mcast(const Event& e) {
queue.push(e);
}
+
void Multicaster::sendMcast(PollableEventQueue::Queue& values) {
try {
PollableEventQueue::Queue::iterator i = values.begin();
- while (i != values.end() && i->mcast(cpg)) {
+ while( i != values.end()) {
+ iovec iov = { const_cast<char*>(i->getStore()), i->getStoreSize() };
+ if (!cpg.mcast(&iov, 1)) break; // returns false for flow control
QPID_LOG(trace, " MCAST " << *i);
++i;
}