| 367 | } |
| 368 | |
| 369 | void PanadapterStream::startWanUdpRegister(quint32 clientHandle) |
| 370 | { |
| 371 | m_wanClientHandle = clientHandle; |
| 372 | m_wanRegistered = false; |
| 373 | |
| 374 | const QString hex = QString::number(clientHandle, 16).toUpper(); |
| 375 | qCDebug(lcVita49) << "PanadapterStream: WAN — starting UDP registration," |
| 376 | << "handle=0x" + hex |
| 377 | << "sending to" << m_radioAddress.toString() << ":" << m_radioPort; |
| 378 | |
| 379 | // Send first registration immediately, then every 50ms until confirmed |
| 380 | const QByteArray cmd = QStringLiteral("client udp_register handle=0x%1").arg(hex).toUtf8(); |
| 381 | const qint64 sent = m_socket->writeDatagram(cmd, m_radioAddress, m_radioPort); |
| 382 | if (sent > 0) |
| 383 | m_totalTxBytes.fetch_add(sent); |
| 384 | m_wanRegisterTimer->start(50); |
| 385 | } |
| 386 | |
| 387 | void PanadapterStream::stop() |
| 388 | { |
no test coverage detected