mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-06-03 06:24:48 -04:00
SDRdaemonFEC support. allow for smaller datagrams than the UDP block size
This commit is contained in:
@@ -129,13 +129,16 @@ void SDRdaemonFECUDPHandler::configureUDPLink(const QString& address, quint16 po
|
||||
|
||||
void SDRdaemonFECUDPHandler::dataReadyRead()
|
||||
{
|
||||
m_udpReadBytes = 0;
|
||||
|
||||
while (m_dataSocket->hasPendingDatagrams())
|
||||
{
|
||||
qint64 pendingDataSize = m_dataSocket->pendingDatagramSize();
|
||||
m_udpReadBytes = m_dataSocket->readDatagram(m_udpBuf, pendingDataSize, &m_remoteAddress, 0);
|
||||
m_udpReadBytes += m_dataSocket->readDatagram(&m_udpBuf[m_udpReadBytes], pendingDataSize, &m_remoteAddress, 0);
|
||||
|
||||
if (m_udpReadBytes == SDRdaemonFECBuffer::m_udpPayloadSize) {
|
||||
processData();
|
||||
m_udpReadBytes = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user