public function getResponse(RequestInterface $request)
    {
        $this->write($request->getPacket());

        return $request->getResponse()->init($this->read());
    }
public function getResponse(RequestInterface $request)
    {
        $this->write($request->getPacket());

        return $request->getResponse()->init($this->read());
    }
public function getResponse ( RequestInterface $ request ) { $ this -> write ( $ request -> getPacket ( ) ) ; return $ request -> getResponse ( ) -> init ( $ this -> read ( ) ) ; }
Send a request to the server and construct an appropriate response.

@param RequestInterface $request

@return ResponseInterface
Send a request to the server and construct an appropriate response .