private function initPushServer()
    {
        $pushBind = $this->sandstoneApplication['sandstone.push.server']['bind'];
        $pushPort = $this->sandstoneApplication['sandstone.push.server']['port'];

        $context = new Context($this->loop);
        $pushServer = $context->getSocket(ZMQ::SOCKET_PULL);

        $pushServer->bind("tcp://$pushBind:$pushPort");

        $pushServer->on('message', function ($message) {
            $data = $this->sandstoneApplication['sandstone.push.event_serializer']->deserializeEvent($message);

            $this->logger->info('Push message event', ['event' => $data['name']]);

            $this->sandstoneApplication['dispatcher']->dispatch($data['name'], $data['event']);
        });
    }
private function initPushServer()
    {
        $pushBind = $this->sandstoneApplication['sandstone.push.server']['bind'];
        $pushPort = $this->sandstoneApplication['sandstone.push.server']['port'];

        $context = new Context($this->loop);
        $pushServer = $context->getSocket(ZMQ::SOCKET_PULL);

        $pushServer->bind("tcp://$pushBind:$pushPort");

        $pushServer->on('message', function ($message) {
            $data = $this->sandstoneApplication['sandstone.push.event_serializer']->deserializeEvent($message);

            $this->logger->info('Push message event', ['event' => $data['name']]);

            $this->sandstoneApplication['dispatcher']->dispatch($data['name'], $data['event']);
        });
    }
private function initPushServer ( ) { $ pushBind = $ this -> sandstoneApplication [ 'sandstone.push.server' ] [ 'bind' ] ; $ pushPort = $ this -> sandstoneApplication [ 'sandstone.push.server' ] [ 'port' ] ; $ context = new Context ( $ this -> loop ) ; $ pushServer = $ context -> getSocket ( ZMQ :: SOCKET_PULL ) ; $ pushServer -> bind ( "tcp://$pushBind:$pushPort" ) ; $ pushServer -> on ( 'message' , function ( $ message ) { $ data = $ this -> sandstoneApplication [ 'sandstone.push.event_serializer' ] -> deserializeEvent ( $ message ) ; $ this -> logger -> info ( 'Push message event' , [ 'event' => $ data [ 'name' ] ] ) ; $ this -> sandstoneApplication [ 'dispatcher' ] -> dispatch ( $ data [ 'name' ] , $ data [ 'event' ] ) ; } ) ; }
Init push server and redispatch events from push server to application stack.
Init push server and redispatch events from push server to application stack .