Index: /trunk/BNC/bncrinex.cpp
===================================================================
--- /trunk/BNC/bncrinex.cpp	(revision 1385)
+++ /trunk/BNC/bncrinex.cpp	(revision 1386)
@@ -54,5 +54,5 @@
 #include "bnctabledlg.h"
 #include "bncgetthread.h"
-#include "bncsocket.h"
+#include "bncnetqueryv2.h"
 #include "RTCM3/rtcm3torinex.h"
 
@@ -154,22 +154,13 @@
     }
 
-    const int timeOut = 10*1000;
-    QString msg;
-    QByteArray _latitude;
-    QByteArray _longitude;
-    QByteArray _nmea;
-    bncSocket* socket = new bncSocket();
-    if (socket->request(url, _latitude, _longitude, 
-                        _nmea, _ntripVersion, timeOut, msg) != success) {
-      delete socket;
-      return failure;
-    }
-
-    _headerLines.clear();
-    bool firstLineRead = false;
-    while (true) {
-      if (socket->canReadLine()) {
-        QString line = socket->readLine();
-        line.chop(1);
+    bncNetQueryV2 query;
+    QByteArray outData;
+    query.waitForRequestResult(url, outData);
+    if (query.status() == bncNetQuery::finished) {
+      _headerLines.clear();
+      bool firstLineRead = false;
+      QTextStream in(outData);
+      QString line = in.readLine();
+      while ( !line.isNull() ) {
         if (line.indexOf("MARKER NAME") != -1) {
           irc = success;
@@ -205,15 +196,11 @@
           }
         }
-      }
-      else {
-        socket->waitForReadyRead(timeOut);
-        if (socket->bytesAvailable() > 0) {
-          continue;
-        }
-        else {
-          break;
-        }
-      }
-    }
+        line = in.readLine();
+      }
+    } 
+    else {
+      return failure;
+    }
+
   }
   return irc;
