public function run(): void
    {
        $this->connectionManager->listen();

        while ($this->loop->shouldContinue()) {
            /*
             * If there's nothing changed on any of the sockets, the server
             * will sleep and other processes will have a change to run. Control
             * this behaviour with the timeout options.
             */
            $this->connectionManager->selectAndProcess();

            /*
             * If the application wants to perform periodic operations or queries
             * and push updates to clients based on the result then that logic can
             * be implemented in the 'onUpdate' method.
             */
            foreach ($this->applications as $application) {
                if (method_exists($application, 'onUpdate')) {
                    $application->onUpdate();
                }
            }
        }
    }
public function run(): void
    {
        $this->connectionManager->listen();

        while ($this->loop->shouldContinue()) {
            /*
             * If there's nothing changed on any of the sockets, the server
             * will sleep and other processes will have a change to run. Control
             * this behaviour with the timeout options.
             */
            $this->connectionManager->selectAndProcess();

            /*
             * If the application wants to perform periodic operations or queries
             * and push updates to clients based on the result then that logic can
             * be implemented in the 'onUpdate' method.
             */
            foreach ($this->applications as $application) {
                if (method_exists($application, 'onUpdate')) {
                    $application->onUpdate();
                }
            }
        }
    }
public function run ( ) : void { $ this -> connectionManager -> listen ( ) ; while ( $ this -> loop -> shouldContinue ( ) ) { /*
             * If there's nothing changed on any of the sockets, the server
             * will sleep and other processes will have a change to run. Control
             * this behaviour with the timeout options.
             */ $ this -> connectionManager -> selectAndProcess ( ) ; /*
             * If the application wants to perform periodic operations or queries
             * and push updates to clients based on the result then that logic can
             * be implemented in the 'onUpdate' method.
             */ foreach ( $ this -> applications as $ application ) { if ( method_exists ( $ application , 'onUpdate' ) ) { $ application -> onUpdate ( ) ; } } } }
Main server loop

@return void This method does not return!
Main server loop