Changeset 9713 in ntrip
- Timestamp:
- May 7, 2022, 11:57:34 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/upload/bncuploadcaster.cpp
r9712 r9713 60 60 if (_ntripVersion != "1") { 61 61 bncSettings settings; 62 63 _sslIgnoreErrors = (Qt::CheckState(settings.value("sslIgnoreErrors").toInt()) == Qt::Checked); 64 62 65 _proxyHost = settings.value("proxyHost").toString(); 63 66 _proxyPort = settings.value("proxyPort").toInt(); 64 _sslIgnoreErrors = (Qt::CheckState(settings.value("sslIgnoreErrors").toInt()) == Qt::Checked);65 67 if (_secure) { 66 68 _casterOutPort = 443; 67 _postExtension = QString("https://%1:%2").arg(_casterOutHost).arg(_casterOutPort); 69 if (!_proxyHost.isEmpty()) { 70 _postExtension = QString("https://%1:%2").arg(_casterOutHost).arg(_casterOutPort); 71 } 68 72 } 69 73 else { 70 _postExtension = QString("http://%1:%2").arg(_casterOutHost).arg(_casterOutPort); 74 if (!_proxyHost.isEmpty()) { 75 _postExtension = QString("http://%1:%2").arg(_casterOutHost).arg(_casterOutPort); 76 } 71 77 } 72 78 } … … 203 209 } 204 210 else { 205 cout << "open(): outSocketState: " << _outSocket->state() << endl;206 211 emit(newMessage("Broadcaster: No connection for " + _mountpoint.toLatin1(), true)); 207 212 } … … 236 241 } 237 242 243 const int timeOut = 5000; // 5 seconds 238 244 if (!_secure) { 239 245 _outSocket->connectToHost(_outHost, _outPort); 240 } 241 else { 242 _outSocket->connectToHostEncrypted(_outHost, _outPort); 243 if (!_outSocket->waitForEncrypted()) { 244 cout << "waitForEncrypted: " << _outSocket->errorString().toStdString().c_str() << endl;; 245 return; 246 } 247 } 248 249 const int timeOut = 5000; // 5 seconds 250 if (!_outSocket->waitForConnected(timeOut)) { 251 emit(newMessage("Broadcaster: Connect timeout for " + _mountpoint.toLatin1() 252 + " (" + _outHost.toLatin1()+ ":" + QString("%1) ").arg(_outPort).toLatin1() 253 + _outSocket->errorString().toLatin1(), true)); 254 delete _outSocket; 255 _outSocket = 0; 256 return; 257 } 246 if (!_outSocket->waitForConnected(timeOut)) { 247 emit(newMessage("Broadcaster: Connect timeout for " + _mountpoint.toLatin1() 248 + " (" + _outHost.toLatin1()+ ":" + QString("%1) ").arg(_outPort).toLatin1() 249 + _outSocket->errorString().toLatin1(), true)); 250 delete _outSocket; 251 _outSocket = 0; 252 return; 253 } 254 } 255 else { 256 _outSocket->connectToHostEncrypted(_outHost, _outPort); 257 if (!_outSocket->waitForEncrypted(timeOut)) { 258 emit(newMessage("Broadcaster: Connect timeout for " + _mountpoint.toLatin1() 259 + " (" + _outHost.toLatin1()+ ":" + QString("%1) ").arg(_outPort).toLatin1() 260 + _outSocket->errorString().toLatin1(), true)); 261 delete _outSocket; 262 _outSocket = 0; 263 return; 264 } 265 } 258 266 259 267 QByteArray msg;
Note:
See TracChangeset
for help on using the changeset viewer.