protected function loop() { $this->loop = true; while ($this->loop) { $request = RPC\Request::fromJSON($this->socket->get()); $result = $this->getMethod($request->getMethod())->execute($request); $response = new RPC\Response(); $response->setId($request->getId()); $response->setResult($result); $this->socket->put($response->toJSON()); //$this->checkStatus();*/ var_dump('request'); } }