Changeset 1358 in ntrip
- Timestamp:
- Dec 27, 2008, 4:18:43 PM (16 years ago)
- Location:
- trunk/BNC
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/bncsocket.cpp
r1357 r1358 292 292 //////////////////////////////////////////////////////////////////////////// 293 293 void bncSocket::slotRequestFinished(int id, bool error) { 294 cout << "slotRequestFinished " << id << " " << error << endl; 295 this->deleteLater(); 294 cout << "slotRequestFinished " << id << endl; 295 if (error) { 296 cout << "error: " << _http->error() << " " 297 << _http->errorString().toAscii().data() << endl; 298 } 296 299 } 297 300 … … 300 303 void bncSocket::slotReadyRead(const QHttpResponseHeader&) { 301 304 cout << "slotReadyRead" << endl; 305 QByteArray buffer = _http->readAll(); 306 cout << buffer.data(); 302 307 } 303 308 … … 311 316 //////////////////////////////////////////////////////////////////////////// 312 317 void bncSocket::slotDone(bool error) { 313 cout << "slotDone " << error << endl; 318 cout << "slotDone " << endl; 319 if (error) { 320 cout << "error: " << _http->error() << " " 321 << _http->errorString().toAscii().data() << endl; 322 } 314 323 } 315 324 … … 328 337 _http->setSocket(_socket); 329 338 339 _http->setHost(url.host()); 340 330 341 // Network Request 331 342 // --------------- 332 QHttpRequestHeader request("GET", url.path()); 343 QString path = url.path(); 344 if (path.isEmpty()) { 345 path = "/"; 346 } 347 QHttpRequestHeader request("GET", path); 333 348 request.addValue("Host" , url.host().toAscii()); 334 349 request.addValue("Ntrip-Version", "NTRIP/2.0"); 335 request.addValue("User-Agent" , "NTRIP BNC/ 1.7");350 request.addValue("User-Agent" , "NTRIP BNC/" BNCVERSION); 336 351 if (!url.userName().isEmpty()) { 337 352 request.addValue("Authorization", "Basic " + … … 349 364 this, SLOT(slotSslErrors(const QList<QSslError>&))); 350 365 366 _http->request(request); 367 351 368 return success; 352 369 } -
trunk/BNC/bnctabledlg.cpp
r1353 r1358 219 219 } 220 220 } 221 delete socket; 221 /// delete socket; 222 222 223 223 allTables.insert(casterHost, allLines);
Note:
See TracChangeset
for help on using the changeset viewer.