PHPDaemon\SockJS\Examples\Simple::onReady PHP Method

onReady() public method

Called when the worker is ready to go.
public onReady ( ) : void
return void
    public function onReady()
    {
        \PHPDaemon\Servers\WebSocket\Pool::getInstance()->addRoute('/sockjs', function ($client) {
            return new SimpleRoute($client, $this);
        });
    }