freenet-router |
Subversion Repositories: |
Compare with Previous - Blame - Download
<?php
namespace Phem\Libraries\MessageBus;
use Ratchet\WebSocket\Version\RFC6455\Message;
/**
* @author Jakub PetrĹžĂlka <petrzilka@czweb.net>
*/
class ZMQPusher extends Pusher
{
public function push($message)
{
$context = new \ZMQContext();
$socket = $context->getSocket(\ZMQ::SOCKET_PUSH, 'ZMQ Pusher');
$socket->connect("tcp://" . WEBSOCKET_PULLER_BIND_ADDR
. ":" . WEBSOCKET_PULLER_PORT);
$socket->send(json_encode($message));
}
}