Skip to content

Commit

Permalink
Update example
Browse files Browse the repository at this point in the history
  • Loading branch information
andot committed Sep 17, 2016
1 parent 8cea00a commit 6d87555
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions examples/src/PushServer.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,11 @@ function hello($name, $context) {

$server = new Server("tcp://0.0.0.0:1980");
$server->publish('news');
$server->onSubscribe = function($topic, $id, $service) {
error_log("client $id subscribe $topic on " . microtime(true));
};
$server->onUnsubscribe = function($topic, $id, $service) {
error_log("client $id unsubscribe $topic on " . microtime(true));
};
$server->addFunction('hello', array('passContext' => true));
$server->start();

0 comments on commit 6d87555

Please sign in to comment.