bool NetClient::listen() { if (!m_bConnected) return false; listenHost(m_pClient); listenHost(m_pHost); return true; }
std::string RhrController::getConfigString() const { std::stringstream config; if (connectionMethod() == RhrController::Connect) { auto host = listenHost(); unsigned short port = listenPort(); config << "connect " << host << " " << port; } else if (connectionMethod() == RhrController::Listen) { auto host = connectHost(); unsigned short port = connectPort(); if (port > 0) { config << "listen " << host << " " << port; } else { int id = m_module->id(); config << "listen " << "_" << " " << ":" << id; } } return config.str(); }