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

Method startConnection

src/core/FreeDvClient.cpp:68–89  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66}
67
68void FreeDvClient::startConnection()
69{
70 if (m_connected.load()) return;
71
72 qCDebug(lcDxCluster) << "FreeDvClient: connecting to qso.freedv.org";
73
74 // Open log file (truncate on each start)
75 m_logFile.close();
76 m_logFile.setFileName(logFilePath());
77 QDir().mkpath(QFileInfo(m_logFile).absolutePath());
78 if (m_logFile.open(QIODevice::WriteOnly | QIODevice::Truncate | QIODevice::Text)) {
79 m_logFile.write(QString("--- FreeDV Reporter connected at %1 ---\n")
80 .arg(QDateTime::currentDateTimeUtc().toString("yyyy-MM-dd HH:mm:ss UTC")).toUtf8());
81 m_logFile.flush();
82 }
83
84 m_stations.clear();
85 m_intentionalDisconnect = false;
86 m_reconnectAttempts = 0;
87 m_ws->open(QUrl(WsUrl));
88 emit started();
89}
90
91void FreeDvClient::stopConnection()
92{

Callers 3

startFreeDvReportingMethod · 0.80
buildMenuBarMethod · 0.80

Calls 8

QUrlClass · 0.70
loadMethod · 0.45
closeMethod · 0.45
openMethod · 0.45
writeMethod · 0.45
toStringMethod · 0.45
flushMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected