MCPcopy Create free account
hub / github.com/LUX-Core/lux / initNetManager

Method initNetManager

src/qt/paymentserver.cpp:357–381  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

355}
356
357void PaymentServer::initNetManager()
358{
359 if (!optionsModel)
360 return;
361 if (netManager != NULL)
362 delete netManager;
363
364 // netManager is used to fetch paymentrequests given in lux: URIs
365 netManager = new QNetworkAccessManager(this);
366
367 QNetworkProxy proxy;
368
369 // Query active SOCKS5 proxy
370 if (optionsModel->getProxySettings(proxy)) {
371 netManager->setProxy(proxy);
372
373 qDebug() << "PaymentServer::initNetManager : Using SOCKS5 proxy" << proxy.hostName() << ":" << proxy.port();
374 } else
375 qDebug() << "PaymentServer::initNetManager : No active proxy server found.";
376
377 connect(netManager, SIGNAL(finished(QNetworkReply*)),
378 this, SLOT(netRequestFinished(QNetworkReply*)));
379 connect(netManager, SIGNAL(sslErrors(QNetworkReply*, const QList<QSslError>&)),
380 this, SLOT(reportSslErrors(QNetworkReply*, const QList<QSslError>&)));
381}
382
383void PaymentServer::uiReady()
384{

Callers

nothing calls this directly

Calls 1

getProxySettingsMethod · 0.80

Tested by

no test coverage detected