onHandshake() public method

Called when the connection is handshaked.
public onHandshake ( ) : void
return void
Example #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();
 }