Index: trunk/GnssCenter/map_stations/thriftclient.cpp
===================================================================
--- trunk/GnssCenter/map_stations/thriftclient.cpp	(revision 5408)
+++ trunk/GnssCenter/map_stations/thriftclient.cpp	(revision 5409)
@@ -14,43 +14,41 @@
 using namespace boost;
 
-// // Program
-// //////////////////////////////////////////////////////////////////////////////
-// int main(int argc, char **argv) {
-// 
-//   // Parse Input Options
-//   // -------------------
-//   map<string, string> OPT;
-//   parseCmdLine(argc, argv, OPT);
-//   if (OPT.find("port") == OPT.end()) {
-//     cerr << "usage: rtnetThriftClient [--host <host>] --port <port>" << endl;
-//     return 1;
-//   }
-//   string host = OPT.find("host") == OPT.end() ? "localhost" : OPT["host"];
-//   int    port; istringstream(OPT["port"]) >> port;
-// 
-//   shared_ptr<TSocket>     socket(new TSocket(host, port));
-//   shared_ptr<TTransport>  transport(new TBufferedTransport(socket)); 
-//   shared_ptr<TProtocol>   protocol(new TBinaryProtocol(transport));
-//   shared_ptr<RtnetDataIf> dataHandler(new t_thriftClient());
-//   shared_ptr<TProcessor>  processor(new RtnetDataProcessor(dataHandler));
-// 
-//   try {
-//     transport->open();
-// 
-//     while (processor->process(protocol,protocol,0)) {}
-// 
-//     transport->close();
-//   } 
-//   catch (TException& e) {
-//     cerr << "Caught an exception generated by Thrift: " << e.what() << endl;
-//     return 1;
-//   } 
-//   catch (...) {
-//     cerr << "Unknown exception" << endl;
-//     return 1;
-//   }
-// 
-//   return 0;
-// }
+// Constructor
+//////////////////////////////////////////////////////////////////////////////
+t_thriftClient::t_thriftClient() {
+
+}
+
+// Destructor
+//////////////////////////////////////////////////////////////////////////////
+t_thriftClient::~t_thriftClient() {
+
+}
+
+// Run (virtual)
+//////////////////////////////////////////////////////////////////////////////
+void t_thriftClient::run() {
+
+  string host = "rtnet.rtcm-ntrip.org";
+  int    port = 7777;
+
+  shared_ptr<TSocket>     socket(new TSocket(host, port));
+  shared_ptr<TTransport>  transport(new TBufferedTransport(socket)); 
+  shared_ptr<TProtocol>   protocol(new TBinaryProtocol(transport));
+  shared_ptr<RtnetDataIf> dataHandler(new t_thriftClient());
+  shared_ptr<TProcessor>  processor(new RtnetDataProcessor(dataHandler));
+
+  try {
+    transport->open();
+    while (processor->process(protocol,protocol,0)) {}
+    transport->close();
+  } 
+  catch (TException& e) {
+    cerr << "Caught an exception generated by Thrift: " << e.what() << endl;
+  } 
+  catch (...) {
+    cerr << "Unknown exception" << endl;
+  }
+}
 
 // Handle Satellite Positions
Index: trunk/GnssCenter/map_stations/thriftclient.h
===================================================================
--- trunk/GnssCenter/map_stations/thriftclient.h	(revision 5408)
+++ trunk/GnssCenter/map_stations/thriftclient.h	(revision 5409)
@@ -4,4 +4,5 @@
 #include <string>
 #include <map>
+#include <QThread>
 
 #include <transport/TSocket.h>
@@ -15,8 +16,9 @@
 // Handler Class Definition
 //////////////////////////////////////////////////////////////////////////////
-class t_thriftClient : public com::gpssolutions::rtnet::RtnetDataIf {
+class t_thriftClient : public com::gpssolutions::rtnet::RtnetDataIf, QThread {
  public:
-  t_thriftClient() {}
-  ~t_thriftClient() {}
+  t_thriftClient();
+  ~t_thriftClient();
+  virtual void run();
 
   void startDataStream() {}
