Created
October 20, 2012 20:25
-
-
Save maggedotno/3924668 to your computer and use it in GitHub Desktop.
ZMQ Pipeline React pull
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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