Skip to content

Instantly share code, notes, and snippets.

@maggedotno
Created October 20, 2012 20:25
Show Gist options
  • Save maggedotno/3924668 to your computer and use it in GitHub Desktop.
Save maggedotno/3924668 to your computer and use it in GitHub Desktop.
ZMQ Pipeline React pull
<?php
require __DIR__ . '/vendor/autoload.php';
use Ratchet\Wamp\WampServer;
use Ratchet\Server\IoServer;
use Ratchet\WebSocket\WsServer;
$loop = React\EventLoop\Factory::create();
$context = new React\ZMQ\Context($loop);
$socket = $context->getSocket(ZMQ::SOCKET_PULL);
$socket->bind('ipc:///tmp/xyz');
$socket->on('message', function() {
echo "-";
});
$loop->run();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment