Skip to content

Commit

Permalink
Updating STDIN thanks to @derickr
Browse files Browse the repository at this point in the history
  • Loading branch information
ianbarber committed Apr 27, 2011
1 parent 4b63946 commit 5280d9c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions poll/poll.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@
$socket = new ZMQSocket($context, ZMQ::SOCKET_PULL);
$socket->bind("tcp://*:5555");

$fh = fopen("php://stdin", 'r');

$poll = new ZMQPoll();
$poll->add($socket, ZMQ::POLL_IN);
$poll->add($fh, ZMQ::POLL_IN);
$poll->add(STDIN, ZMQ::POLL_IN);
$readable = $writeable = array();

while(true) {
Expand Down

0 comments on commit 5280d9c

Please sign in to comment.