jablonka.czprosek.czf

freenet-router

Subversion Repositories:
[/] [trunk/] [freenet-router/] [var/] [www/] [freenet-router/] [Framework/] [Libraries/] [MessageBus/] [ZMQPusher.php] - Blame information for rev 2

 

Line No. Rev Author Line
12simandl<?php
2 
3namespace Phem\Libraries\MessageBus;
4 
5use Ratchet\WebSocket\Version\RFC6455\Message;
6 
7/**
8 * @author Jakub PetrŞílka <petrzilka@czweb.net>
9 */
10class ZMQPusher extends Pusher
11{
12 public function push($message)
13 {
14 $context = new \ZMQContext();
15 $socket = $context->getSocket(\ZMQ::SOCKET_PUSH, 'ZMQ Pusher');
16 $socket->connect("tcp://" . WEBSOCKET_PULLER_BIND_ADDR
17 . ":" . WEBSOCKET_PULLER_PORT);
18 
19 $socket->send(json_encode($message));
20 }
21}

Powered by WebSVN 2.2.1