| 74 | : m_timeout(timeoutMs) {} |
| 75 | |
| 76 | bool connectToServer(const QString& host, quint16 port) |
| 77 | { |
| 78 | m_sock.connectToHost(host, port); |
| 79 | if (!m_sock.waitForConnected(m_timeout)) { |
| 80 | std::cerr << "Connection failed: " |
| 81 | << m_sock.errorString().toStdString() << '\n'; |
| 82 | return false; |
| 83 | } |
| 84 | m_sock.setSocketOption(QAbstractSocket::LowDelayOption, 1); |
| 85 | return true; |
| 86 | } |
| 87 | |
| 88 | // Send in extended mode ('+' prefix); read until RPRT line or 64-line limit. |
| 89 | QStringList send(const QString& cmd) |
no test coverage detected