Index: trunk/BNS/bns.cpp
===================================================================
--- trunk/BNS/bns.cpp	(revision 768)
+++ trunk/BNS/bns.cpp	(revision 769)
@@ -34,4 +34,7 @@
   connect(_bnseph, SIGNAL(error(QByteArray)),
           this, SLOT(slotError(const QByteArray)));
+
+  _clkServer = 0;
+  _clkSocket = 0;
 }
 
@@ -40,4 +43,5 @@
 t_bns::~t_bns() {
   deleteBnsEph();
+  delete _clkServer;
 }
 
@@ -68,9 +72,32 @@
 }
 
+// New Connection
+////////////////////////////////////////////////////////////////////////////
+void t_bns::slotNewConnection() {
+  _clkSocket = _clkServer->nextPendingConnection();
+}
+
 // Start 
 ////////////////////////////////////////////////////////////////////////////
 void t_bns::run() {
+
   slotMessage("============ Start BNS ============");
   _bnseph->start();
+
+  QSettings settings;
+  int port = settings.value("clkPort").toInt();
+
+  _clkServer = new QTcpServer;
+  _clkServer->listen(QHostAddress::Any, port);
+  connect(_clkServer, SIGNAL(newConnection()), this, SLOT(slotNewConnection()));
+
+  while (true) {
+    if (_clkSocket) {
+
+    }
+    else {
+      msleep(100);
+    }
+  }
 }
 
Index: trunk/BNS/bns.h
===================================================================
--- trunk/BNS/bns.h	(revision 768)
+++ trunk/BNS/bns.h	(revision 769)
@@ -2,6 +2,6 @@
 #define BNS_H
 
+#include <QtNetwork>
 #include <QThread>
-#include <QMutex>
 
 #include "bnseph.h"
@@ -19,4 +19,5 @@
  
  private slots:
+  void slotNewConnection();
   void slotMessage(const QByteArray msg);
   void slotError(const QByteArray msg);
@@ -24,6 +25,8 @@
  private:
   void deleteBnsEph();
-  t_bnseph* _bnseph;
-  QMutex    _mutex;
+  QTcpServer* _clkServer;
+  QTcpSocket* _clkSocket;
+  t_bnseph*   _bnseph;
+  QMutex      _mutex;
 };
 #endif
