Skip to content

Commit

Permalink
updating example to use multi
Browse files Browse the repository at this point in the history
  • Loading branch information
ianbarber committed May 25, 2011
1 parent a74d4cf commit b91356c
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions log/logserv.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@
$in->bind("tcp://*:5555");

while(true) {
$messages = array();
do {
$messages[] = $in->recv();
} while($in->getSockOpt(ZMQ::SOCKOPT_RCVMORE));
$messages = $in->recvMulti();
// ... write the messages to disk or similar in one batch
echo "Messages Received: ", count($messages), PHP_EOL;
foreach($messages as $msg) {
Expand Down

0 comments on commit b91356c

Please sign in to comment.