Changeset 1386 in ntrip
- Timestamp:
- Dec 29, 2008, 10:12:29 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/bncrinex.cpp
r1376 r1386 54 54 #include "bnctabledlg.h" 55 55 #include "bncgetthread.h" 56 #include "bnc socket.h"56 #include "bncnetqueryv2.h" 57 57 #include "RTCM3/rtcm3torinex.h" 58 58 … … 154 154 } 155 155 156 const int timeOut = 10*1000; 157 QString msg; 158 QByteArray _latitude; 159 QByteArray _longitude; 160 QByteArray _nmea; 161 bncSocket* socket = new bncSocket(); 162 if (socket->request(url, _latitude, _longitude, 163 _nmea, _ntripVersion, timeOut, msg) != success) { 164 delete socket; 165 return failure; 166 } 167 168 _headerLines.clear(); 169 bool firstLineRead = false; 170 while (true) { 171 if (socket->canReadLine()) { 172 QString line = socket->readLine(); 173 line.chop(1); 156 bncNetQueryV2 query; 157 QByteArray outData; 158 query.waitForRequestResult(url, outData); 159 if (query.status() == bncNetQuery::finished) { 160 _headerLines.clear(); 161 bool firstLineRead = false; 162 QTextStream in(outData); 163 QString line = in.readLine(); 164 while ( !line.isNull() ) { 174 165 if (line.indexOf("MARKER NAME") != -1) { 175 166 irc = success; … … 205 196 } 206 197 } 207 } 208 else { 209 socket->waitForReadyRead(timeOut); 210 if (socket->bytesAvailable() > 0) { 211 continue; 212 } 213 else { 214 break; 215 } 216 } 217 } 198 line = in.readLine(); 199 } 200 } 201 else { 202 return failure; 203 } 204 218 205 } 219 206 return irc;
Note:
See TracChangeset
for help on using the changeset viewer.