Author: Vasily Zorin (maintainer@daemon.io)
Inheritance: implements PHPDaemon\WebSocket\RouteInterface, use trait PHPDaemon\Traits\StaticObjectWatchdog, use trait PHPDaemon\Traits\Sessions, use trait PHPDaemon\Traits\DeferredEventHandlers
Beispiel #1
0
 public function onHandshake()
 {
     $this->defineLocalMethods(['serverTest' => function () {
         $this->callRemote('clientTest', 'foobar', function () {
             Daemon::log('callback called');
         });
     }]);
     $this->onFrame('{"method":"methods","arguments":[{"clientTest":{}}],"callbacks":{"1":[0,"clientTest"]},"links":[]} ', 'STRING');
     parent::onHandshake();
 }