Index: trunk/BNC/bnc.pro
===================================================================
--- trunk/BNC/bnc.pro	(revision 1409)
+++ trunk/BNC/bnc.pro	(revision 1410)
@@ -30,4 +30,5 @@
           bncconst.h bnchtml.h bnctableitem.h bnczerodecoder.h        \
           bncnetquery.h bncnetqueryv1.h bncnetqueryv2.h               \
+          bncnetqueryrtp.h                                            \
           RTCM/GPSDecoder.h RTCM/RTCM2.h RTCM/RTCM2Decoder.h          \
           RTCM/RTCM2_2021.h RTCM/rtcm_utils.h                         \
@@ -48,4 +49,5 @@
           bncconst.cpp bnchtml.cpp bnchlpdlg.cpp bnctableitem.cpp     \
           bnczerodecoder.cpp bncnetqueryv1.cpp bncnetqueryv2.cpp      \
+          bncnetqueryrtp.cpp                                          \
           RTCM/RTCM2.cpp RTCM/RTCM2Decoder.cpp                        \
           RTCM/RTCM2_2021.cpp RTCM/rtcm_utils.cpp                     \
Index: trunk/BNC/bncgetthread.cpp
===================================================================
--- trunk/BNC/bncgetthread.cpp	(revision 1409)
+++ trunk/BNC/bncgetthread.cpp	(revision 1410)
@@ -56,4 +56,5 @@
 #include "bncnetqueryv1.h"
 #include "bncnetqueryv2.h"
+#include "bncnetqueryrtp.h"
 
 #include "RTCM/RTCM2Decoder.h"
@@ -315,5 +316,8 @@
   if (!_rawInpFile) {
     delete _query;
-    if (_ntripVersion == "2") {
+    if      (_ntripVersion == "R") {
+      _query = new bncNetQueryRtp();
+    }
+    else if (_ntripVersion == "2") {
       _query = new bncNetQueryV2();
     }
Index: trunk/BNC/bncnetqueryrtp.cpp
===================================================================
--- trunk/BNC/bncnetqueryrtp.cpp	(revision 1410)
+++ trunk/BNC/bncnetqueryrtp.cpp	(revision 1410)
@@ -0,0 +1,137 @@
+/* -------------------------------------------------------------------------
+ * BKG NTRIP Client
+ * -------------------------------------------------------------------------
+ *
+ * Class:      bncNetQueryRtp
+ *
+ * Purpose:    Blocking Network Requests (NTRIP Version 1)
+ *
+ * Author:     L. Mervart
+ *
+ * Created:    27-Dec-2008
+ *
+ * Changes:    
+ *
+ * -----------------------------------------------------------------------*/
+
+#include <iostream>
+#include <iomanip>
+
+#include "bncnetqueryrtp.h"
+
+using namespace std;
+
+#define BNCVERSION "1.7"
+
+// Constructor
+////////////////////////////////////////////////////////////////////////////
+bncNetQueryRtp::bncNetQueryRtp() {
+  _socket = 0;
+}
+
+// Destructor
+////////////////////////////////////////////////////////////////////////////
+bncNetQueryRtp::~bncNetQueryRtp() {
+  delete _socket;
+}
+
+// 
+////////////////////////////////////////////////////////////////////////////
+void bncNetQueryRtp::stop() {
+#ifndef sparc
+  if (_socket) {
+    _socket->abort();
+  }
+#endif
+  _status = finished;
+}
+
+// 
+////////////////////////////////////////////////////////////////////////////
+void bncNetQueryRtp::waitForRequestResult(const QUrl&, QByteArray&) {
+}
+
+// 
+////////////////////////////////////////////////////////////////////////////
+void bncNetQueryRtp::waitForReadyRead(QByteArray& outData) {
+}
+
+// Connect to Caster, send the Request
+////////////////////////////////////////////////////////////////////////////
+void bncNetQueryRtp::startRequest(const QUrl& url, const QByteArray& gga) {
+
+  const int timeOut = 5000;
+
+  _status = running;
+
+  delete _socket;
+  _socket = new QTcpSocket();
+
+  // Default scheme and path
+  // -----------------------
+  QUrl urlLoc(url);
+  if (urlLoc.scheme().isEmpty()) {
+    urlLoc.setScheme("http");
+  }
+  if (urlLoc.path().isEmpty()) {
+    urlLoc.setPath("/");
+  }
+
+  // Connect the Socket
+  // ------------------
+  QSettings settings;
+  QString proxyHost = settings.value("proxyHost").toString();
+  int     proxyPort = settings.value("proxyPort").toInt();
+ 
+  if ( proxyHost.isEmpty() ) {
+    _socket->connectToHost(urlLoc.host(), urlLoc.port());
+  }
+  else {
+    _socket->connectToHost(proxyHost, proxyPort);
+  }
+  if (!_socket->waitForConnected(timeOut)) {
+    delete _socket; 
+    _socket = 0;
+    _status = error;
+    return;
+  }
+
+  // Send Request
+  // ------------
+  QString uName = QUrl::fromPercentEncoding(urlLoc.userName().toAscii());
+  QString passW = QUrl::fromPercentEncoding(urlLoc.password().toAscii());
+  QByteArray userAndPwd;
+
+  if(!uName.isEmpty() || !passW.isEmpty()) {
+    userAndPwd = "Authorization: Basic " + (uName.toAscii() + ":" +
+    passW.toAscii()).toBase64() + "\r\n";
+  }
+
+  QByteArray reqStr;
+  if ( proxyHost.isEmpty() ) {
+    if (urlLoc.path().indexOf("/") != 0) urlLoc.setPath("/");
+    reqStr = "GET " + urlLoc.path().toAscii() + " HTTP/1.0\r\n"
+             + "User-Agent: NTRIP BNC/" BNCVERSION "\r\n"
+             + userAndPwd + "\r\n";
+  } else {
+    reqStr = "GET " + urlLoc.toEncoded() + " HTTP/1.0\r\n"
+             + "User-Agent: NTRIP BNC/" BNCVERSION "\r\n"
+             + "Host: " + urlLoc.host().toAscii() + "\r\n"
+             + userAndPwd + "\r\n";
+  }
+
+  // NMEA string to handle VRS stream
+  // --------------------------------
+  if (!gga.isEmpty()) {
+    reqStr += gga + "\r\n";
+  }
+
+  _socket->write(reqStr, reqStr.length());
+
+  if (!_socket->waitForBytesWritten(timeOut)) {
+    delete _socket;
+    _socket = 0;
+    _status = error;
+  }
+}
+
Index: trunk/BNC/bncnetqueryrtp.h
===================================================================
--- trunk/BNC/bncnetqueryrtp.h	(revision 1410)
+++ trunk/BNC/bncnetqueryrtp.h	(revision 1410)
@@ -0,0 +1,20 @@
+#ifndef BNCNETQUERYRTP_H
+#define BNCNETQUERYRTP_H
+
+#include "bncnetquery.h"
+
+class bncNetQueryRtp : public bncNetQuery {
+ public:
+  bncNetQueryRtp();
+  virtual ~bncNetQueryRtp();
+
+  virtual void stop();
+  virtual void waitForRequestResult(const QUrl& url, QByteArray& outData);
+  virtual void startRequest(const QUrl& url, const QByteArray& gga);
+  virtual void waitForReadyRead(QByteArray& outData);
+
+ private:
+  QTcpSocket* _socket;
+};
+
+#endif
Index: trunk/BNC/bnctabledlg.cpp
===================================================================
--- trunk/BNC/bnctabledlg.cpp	(revision 1409)
+++ trunk/BNC/bnctabledlg.cpp	(revision 1410)
@@ -79,5 +79,5 @@
 
   _ntripVersionComboBox = new QComboBox();
-  _ntripVersionComboBox->addItems(QString("1,2").split(","));
+  _ntripVersionComboBox->addItems(QString("1,2,R").split(","));
   int kk = _ntripVersionComboBox->findText(settings.value("ntripVersion").toString());
   if (kk != -1) {
