From c3a95e5db514598ecf0a543ceccd4e4a4084ca39 Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Fri, 12 Dec 2008 15:23:39 +0000 Subject: 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 --- cpp/src/qpid/cluster/Multicaster.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'cpp/src/qpid/cluster/Multicaster.cpp') 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(i->getStore()), i->getStoreSize() }; + if (!cpg.mcast(&iov, 1)) break; // returns false for flow control QPID_LOG(trace, " MCAST " << *i); ++i; } -- cgit v1.2.1