Index: /trunk/BNC/bncsocket.cpp
===================================================================
--- /trunk/BNC/bncsocket.cpp	(revision 1355)
+++ /trunk/BNC/bncsocket.cpp	(revision 1356)
@@ -52,4 +52,9 @@
 void bncSocket::connectToHost(const QString &hostName, quint16 port, 
                               QIODevice::OpenMode mode) {
+#if QT_VERSION >= 0x040400
+  if (_reply) {
+  }
+  else
+#endif
   if (_socket) {
     _socket->connectToHost(hostName, port, mode);
@@ -60,4 +65,10 @@
 ////////////////////////////////////////////////////////////////////////////
 bool bncSocket::waitForConnected(int msecs) {
+#if QT_VERSION >= 0x040400
+  if (_reply) {
+    return true;
+  }
+  else
+#endif
   if (_socket) {
     return _socket->waitForConnected(msecs);
@@ -71,4 +82,10 @@
 ////////////////////////////////////////////////////////////////////////////
 QAbstractSocket::SocketState bncSocket::state() const {
+#if QT_VERSION >= 0x040400
+  if (_reply) {
+    return QAbstractSocket::ConnectedState;
+  }
+  else
+#endif
   if (_socket) {
     return _socket->state();
@@ -82,4 +99,10 @@
 ////////////////////////////////////////////////////////////////////////////
 void bncSocket::close() {
+#if QT_VERSION >= 0x040400
+  if (_reply) {
+    _reply->close();
+  }
+  else
+#endif
   if (_socket) {
     _socket->close();
@@ -90,4 +113,10 @@
 ////////////////////////////////////////////////////////////////////////////
 qint64 bncSocket::bytesAvailable() const {
+#if QT_VERSION >= 0x040400
+  if (_reply) {
+    return _reply->bytesAvailable();
+  }
+  else
+#endif
   if (_socket) {
     return _socket->bytesAvailable();
@@ -101,4 +130,10 @@
 ////////////////////////////////////////////////////////////////////////////
 bool bncSocket::canReadLine() const {
+#if QT_VERSION >= 0x040400
+  if (_reply) {
+    return _reply->canReadLine();
+  }
+  else
+#endif
   if (_socket) {
     return _socket->canReadLine();
@@ -112,4 +147,10 @@
 ////////////////////////////////////////////////////////////////////////////
 QByteArray bncSocket::readLine(qint64 maxlen) {
+#if QT_VERSION >= 0x040400
+  if (_reply) {
+    return _reply->readLine(maxlen);
+  }
+  else
+#endif
   if (_socket) {
     return _socket->readLine(maxlen);
@@ -123,4 +164,10 @@
 ////////////////////////////////////////////////////////////////////////////
 bool bncSocket::waitForReadyRead(int msecs) {
+#if QT_VERSION >= 0x040400
+  if (_reply) {
+    return _reply->waitForReadyRead(msecs);
+  }
+  else
+#endif
   if (_socket) {
     return _socket->waitForReadyRead(msecs);
@@ -134,4 +181,10 @@
 ////////////////////////////////////////////////////////////////////////////
 qint64 bncSocket::read(char* data, qint64 maxlen) {
+#if QT_VERSION >= 0x040400
+  if (_reply) {
+    return _reply->read(data, maxlen);
+  }
+  else
+#endif
   if (_socket) {
     return _socket->read(data, maxlen);
@@ -145,4 +198,10 @@
 ////////////////////////////////////////////////////////////////////////////
 qint64 bncSocket::write(const char* data, qint64 len) {
+#if QT_VERSION >= 0x040400
+  if (_reply) {
+    return -1;
+  }
+  else
+#endif
   if (_socket) {
     return _socket->write(data, len);
@@ -156,4 +215,10 @@
 ////////////////////////////////////////////////////////////////////////////
 bool bncSocket::waitForBytesWritten(int msecs) {
+#if QT_VERSION >= 0x040400
+  if (_reply) {
+    return _reply->waitForBytesWritten(msecs);
+  }
+  else
+#endif
   if (_socket) {
     return _socket->waitForBytesWritten(msecs);
@@ -330,5 +395,5 @@
 // Connect to Caster NTRIP Version 2
 ////////////////////////////////////////////////////////////////////////////
-t_irc bncSocket::request2(const QUrl& mountPoint, const QByteArray& latitude, 
+t_irc bncSocket::request2(const QUrl& url, const QByteArray& latitude, 
                          const QByteArray& longitude, const QByteArray& nmea,
                          int timeOut, QString& msg) {
@@ -337,5 +402,36 @@
   return failure;
 #else
-
-#endif
-}
+  // Network Access Manager
+  // ----------------------
+  if (_manager == 0) {
+    _manager = new QNetworkAccessManager(this);
+  }
+  else {
+    return failure;
+  }
+
+  // Network Request
+  // ---------------
+  QNetworkRequest request;
+  request.setUrl(url);
+  request.setRawHeader("Host"         , url.host().toAscii());
+  request.setRawHeader("Ntrip-Version", "NTRIP/2.0");
+  request.setRawHeader("User-Agent"   , "NTRIP BNC/1.7");
+  if (!url.userName().isEmpty()) {
+    request.setRawHeader("Authorization", "Basic " + 
+                 (url.userName() + ":" + url.password()).toAscii().toBase64());
+  } 
+  request.setRawHeader("Connection"   , "close");
+
+  _reply = _manager->get(request);
+
+  connect(_reply, SIGNAL(finished()), this, SLOT(slotReplyFinished()));
+  connect(_reply, SIGNAL(readyRead()), this, SLOT(slotReadyRead()));
+  connect(_reply, SIGNAL(error(QNetworkReply::NetworkError)),
+          this, SLOT(slotError(QNetworkReply::NetworkError)));
+  connect(_reply, SIGNAL(sslErrors(const QList<QSslError>&)), 
+          this, SLOT(slotSslErrors(const QList<QSslError>&)));
+
+  return success;
+#endif
+}
Index: /trunk/BNC/bncsocket.h
===================================================================
--- /trunk/BNC/bncsocket.h	(revision 1355)
+++ /trunk/BNC/bncsocket.h	(revision 1356)
@@ -41,5 +41,5 @@
 
  private:
-  t_irc request2(const QUrl& mountPoint, const QByteArray& latitude, 
+  t_irc request2(const QUrl& url, const QByteArray& latitude, 
                  const QByteArray& longitude, const QByteArray& nmea, 
                  int timeOut, QString& msg);
