Skip to content

Commit

Permalink
Update examples.
Browse files Browse the repository at this point in the history
  • Loading branch information
andot committed Aug 11, 2016
1 parent b652d0b commit 11bd2c2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions examples/src/server/PushServer.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,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 11bd2c2

Please sign in to comment.