diff --git a/examples/src/server/PushServer.php b/examples/src/server/PushServer.php index 6374ec98..af2e51e3 100644 --- a/examples/src/server/PushServer.php +++ b/examples/src/server/PushServer.php @@ -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();