Hi list,

In the presentation of Ian Barber, there is a PHP example where the socket is a file descriptor on the standard input.

$ctx = new ZMQContext();
$sock = $ctx->getSocket(ZMQ::SOCKET_PULL);
$sock->bind("tcp://*:5555");
$fh = fopen("php://stdin", 'r');
$poll = new ZMQPoll();
$poll->add($sock, ZMQ::POLL_IN);
$poll->add($fh, ZMQ::POLL_IN);
while(true) {
    $events = $poll->poll($read, $write);
    if($read[0] === $sock) {
        echo "ZMQ: ", $read[0]->recv();
    } else {
        echo "STDIN: ", fgets($read[0]);
}}

I have not find anything on that in the documentation. I would need more information please, especially to transfer a file from one process to an other, possibly with streaming, in C.

Cheers,

Laurent.



_______________________________________________
zeromq-dev mailing list
[email protected]
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Reply via email to