MCPcopy Create free account
hub / github.com/dannagle/PacketSender / initDTLS

Method initDTLS

src/persistentconnection.cpp:230–271  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

228}
229
230void PersistentConnection::initDTLS()
231{
232
233 this->dthread = nullptr;
234 QString tcpOrSSL = "TCP";
235 if (sendPacket.isSSL()) {
236 tcpOrSSL = "SSL";
237 }
238 if(sendPacket.isDTLS()){
239 tcpOrSSL = "DTLS";
240 }
241 setWindowTitle(tcpOrSSL + "://" + sendPacket.toIP + ":" + QString::number(sendPacket.port));
242
243
244 reSendPacket.clear();
245 if (sendPacket.repeat > 0) {
246 QDEBUG() << "This packet is repeating";
247 reSendPacket = sendPacket;
248 } else {
249
250 ui->stopResendingButton->hide();
251 }
252
253
254 QApplication::processEvents();
255
256
257 QSettings settings(SETTINGSFILE, QSettings::IniFormat);
258 bool appendCR = settings.value("appendCRcheck", true).toBool();
259 ui->appendCRcheck->setChecked(appendCR);
260
261 this->darkMode = Settings::useDark();
262
263
264 ui->stopResendingButton->setStyleSheet(PersistentConnection::RESEND_BUTTON_STYLE);
265 ui->stopResendingButton->setFlat(true);
266 ui->stopResendingButton->setCursor(Qt::PointingHandCursor);
267 ui->stopResendingButton->setIcon(QIcon(PSLOGO));
268
269 connect(ui->stopResendingButton, &QPushButton::clicked, this, &PersistentConnection::cancelResends);
270
271}
272
273void PersistentConnection::refreshTimerTimeout()
274{

Callers

nothing calls this directly

Calls 4

isSSLMethod · 0.80
isDTLSMethod · 0.80
setIconMethod · 0.80
clearMethod · 0.45

Tested by

no test coverage detected