Changeset 1498 in ntrip


Ignore:
Timestamp:
Jan 18, 2009, 2:19:54 PM (15 years ago)
Author:
mervart
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/bncnetqueryv1.cpp

    r1408 r1498  
    6666void bncNetQueryV1::startRequest(const QUrl& url, const QByteArray& gga) {
    6767
    68   const int timeOut = 5000;
     68  const int timeOut = 20000;
    6969
    7070  _status = running;
     
    138138    _socket = 0;
    139139    _status = error;
     140    emit newMessage("bncnetqueryv1: write timeout", true);
     141    return;
     142  }
     143
     144  // Read Caster Response
     145  // --------------------
     146  while (true) {
     147    if (!_socket->waitForReadyRead(timeOut)) {
     148      delete _socket;
     149      _socket = 0;
     150      _status = error;
     151      emit newMessage("bncnetqueryv1: read timeout", true);
     152      return;
     153    }
     154    if (_socket->canReadLine()) {
     155      QString line = _socket->readLine();
     156      cout << ">" << line.toAscii().data() << "<" << endl;
     157      if (line.indexOf("ICY 200 OK") != -1) {
     158        break;
     159      }
     160    }
    140161  }
    141162}
Note: See TracChangeset for help on using the changeset viewer.