jablonka.czprosek.czf

freenet-router

Subversion Repositories:
[/] [trunk/] [freenet-router/] [var/] [www/] [freenet-router/] [Framework/] [Libraries/] [MessageBus/] [ReactSocketPusher.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 ReactSocketPusher extends Pusher
11{
12 
13 public function push($message)
14 {
15 $fp = stream_socket_client(
16 'tcp://' . WEBSOCKET_PULLER_BIND_ADDR
17 . ':' . WEBSOCKET_PULLER_PORT, $errno, $errstr, 30);
18 if ($fp)
19 {
20 fwrite($fp, json_encode($message));
21 fclose($fp);
22 }
23 }
24 
25}

Powered by WebSVN 2.2.1