finishing touches to advertiser

This commit is contained in:
scatterflower 2020-08-23 05:54:02 -05:00
parent b186416874
commit cdfa2d5760

View File

@ -21,12 +21,14 @@ void Advertiser::contactMasterServer() {
} }
void Advertiser::readData() { void Advertiser::readData() {
// The master server should never really send data back to us // The information coming back from the MS isn't very useful
// But we handle it anyways, just in case this ever ends up being implemented // However, it can be useful to see it when debugging
qDebug() << socket->readAll(); // qDebug() << socket->readAll();
} }
void Advertiser::socketConnected() { void Advertiser::socketConnected() {
// TODO: fire a signal here, i18n
qDebug("Connected to the master server");
QString concat_ports; QString concat_ports;
if(ws_port == -1) if(ws_port == -1)
concat_ports = QString::number(local_port); concat_ports = QString::number(local_port);
@ -38,9 +40,9 @@ void Advertiser::socketConnected() {
socket->write(data); socket->write(data);
socket->flush(); socket->flush();
qDebug("Advertisement sent to master server");
} }
void Advertiser::socketDisconnected() { void Advertiser::socketDisconnected() {
qDebug("Socket disconnected"); // TODO: fire a signal here, i18n
qDebug("Connection to master server lost");
} }