MCPcopy Create free account
hub / github.com/aethersdr/AetherSDR / startWanUdpRegister

Method startWanUdpRegister

src/core/PanadapterStream.cpp:369–385  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

367}
368
369void 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
387void PanadapterStream::stop()
388{

Callers 1

registerAsGuiClientMethod · 0.80

Calls 2

toStringMethod · 0.45
startMethod · 0.45

Tested by

no test coverage detected