Index: /trunk/BNS/bnseph.cpp
===================================================================
--- /trunk/BNS/bnseph.cpp	(revision 758)
+++ /trunk/BNS/bnseph.cpp	(revision 759)
@@ -22,4 +22,5 @@
 ////////////////////////////////////////////////////////////////////////////
 t_bnseph::t_bnseph(QObject* parent) : QThread(parent) {
+  _socket = 0;
 }
 
@@ -27,4 +28,5 @@
 ////////////////////////////////////////////////////////////////////////////
 t_bnseph::~t_bnseph() {
+  delete _socket;
 }
 
@@ -32,5 +34,32 @@
 ////////////////////////////////////////////////////////////////////////////
 void t_bnseph::run() {
-  emit(newMessage("============ Start bnseph ============"));
+
+  emit(newMessage("bnseph::run Start"));
+
+  // Connect the Socket
+  // ------------------
+  QSettings settings;
+  QString host = settings.value("ephHost").toString();
+  int     port = settings.value("ephPort").toInt();
+
+  _socket = new QTcpSocket();
+  _socket->connectToHost(host, port);
+
+  const int timeOut = 10*1000;  // 10 seconds
+  if (!_socket->waitForConnected(timeOut)) {
+    emit(newMessage("bnseph::run Connect Timeout"));
+    delete _socket; _socket = 0;
+    return;
+  }
+
+  while (true) {
+    if (_socket->canReadLine()) {
+      QByteArray line = _socket->readLine();
+      emit(newMessage(line));
+    }
+    else {
+      _socket->waitForReadyRead(10);
+    }
+  }
 }
 
Index: /trunk/BNS/bnseph.h
===================================================================
--- /trunk/BNS/bnseph.h	(revision 758)
+++ /trunk/BNS/bnseph.h	(revision 759)
@@ -3,5 +3,5 @@
 
 #include <QThread>
-#include <QMutex>
+#include <QtNetwork>
 
 class t_bnseph : public QThread {
@@ -16,5 +16,5 @@
  
  private:
-  QMutex _mutex;
+  QTcpSocket* _socket;
 };
 #endif
