Changeset 301 in ntrip


Ignore:
Timestamp:
Nov 12, 2006, 5:15:17 PM (17 years ago)
Author:
mervart
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/bncrinex.cpp

    r300 r301  
    5454#include "bncconst.h"
    5555#include "bnctabledlg.h"
     56#include "bncgetthread.h"
    5657#include "RTCM3/rtcm3torinex.h"
    5758
     
    131132    }
    132133    if (!sklDir.isEmpty() && sklDir != "none") {
    133       cout << _mountPoint.path().mid(1).toAscii().data() << " "
    134            << sklDir.toAscii().data() << endl;
     134      QUrl url(sklDir + "/" + _mountPoint.path().mid(1,4) + ".skl");
     135      url.setPort(80);
     136
     137      cout << url.toString().toAscii().data() << endl;
     138
     139      const int timeOut = 10*1000;
     140      QString msg;
     141      QTcpSocket* socket = bncGetThread::request(url, timeOut, msg);
     142
     143      cout << msg.toAscii().data() << endl;
     144
     145      if (socket) {
     146
     147        cout << "haha" << endl;
     148        while (true) {
     149          if (socket->canReadLine()) {
     150            QString line = socket->readLine();
     151            cout << line.toAscii().data() << endl;
     152          }
     153          else {
     154            socket->waitForReadyRead(timeOut);
     155            if (socket->bytesAvailable() > 0) {
     156              continue;
     157            }
     158            else {
     159              break;
     160            }
     161          }
     162        }
     163        delete socket;
     164      }
    135165    }
    136166  }
Note: See TracChangeset for help on using the changeset viewer.