protected function loop($socket)
    {
        while (true) {
            try {
                $result = $this->read($socket);  // is blocking
            } catch (\RuntimeException $e) {
                break;
            }
            $this->write($socket, call_user_func($this->procedure, $result));
        }
    }
protected function loop($socket)
    {
        while (true) {
            try {
                $result = $this->read($socket);  // is blocking
            } catch (\RuntimeException $e) {
                break;
            }
            $this->write($socket, call_user_func($this->procedure, $result));
        }
    }
protected function loop ( $ socket ) { while ( true ) { try { $ result = $ this -> read ( $ socket ) ; // is blocking } catch ( \ RuntimeException $ e ) { break ; } $ this -> write ( $ socket , call_user_func ( $ this -> procedure , $ result ) ) ; } }
The loop for worker processes to processing a task.

@param   resource  $socket
@return  void
The loop for worker processes to processing a task .