public function sendCommand(string $command) : string
    {
        try {
            $this->socket->send(json_encode([
                'action' => 'command',
                'command' => [
                    'name' => $command,
                ]
            ]));
            $result = $this->socket->recv();
            return $result;
        } catch (\ZMQException $e) {
            throw new ClientException($e->getMessage());
        }
    }
public function sendCommand(string $command) : string
    {
        try {
            $this->socket->send(json_encode([
                'action' => 'command',
                'command' => [
                    'name' => $command,
                ]
            ]));
            $result = $this->socket->recv();
            return $result;
        } catch (\ZMQException $e) {
            throw new ClientException($e->getMessage());
        }
    }
public function sendCommand ( string $ command ) : string { try { $ this -> socket -> send ( json_encode ( [ 'action' => 'command' , 'command' => [ 'name' => $ command , ] ] ) ) ; $ result = $ this -> socket -> recv ( ) ; return $ result ; } catch ( \ ZMQException $ e ) { throw new ClientException ( $ e -> getMessage ( ) ) ; } }
Sends a controll command to server and returns servers response.

@throws ClientException
@param string $command
@return string
Sends a controll command to server and returns servers response .