Decouple spot client from message client

Decouple under-the-covers usage of the message client’s socket by the spot client, in order to facilitate future multicast operations by the message client.
This commit is contained in:
Allan Bazinet 2024-11-05 06:36:43 -08:00
parent bb33f50bef
commit 080494f602
5 changed files with 280 additions and 168 deletions

View file

@ -280,20 +280,4 @@ MessageClient::send(Message const & message)
}
}
// Send a raw datagram to the host and port specified, if they've got sane
// values. We're just leveraging the fact that we've got a socket to play
// with; this is, in short, just a convenient way to obtain general UDP
// messaging, unrelated to everything above.
void
MessageClient::send_raw_datagram(QByteArray const & datagram,
QHostAddress const & host,
quint16 const port)
{
if (port && !host.isNull())
{
m_->writeDatagram(datagram, host, port);
}
}
/******************************************************************************/