Revision: 40621
          http://brlcad.svn.sourceforge.net/brlcad/?rev=40621&view=rev
Author:   davidloman
Date:     2010-09-20 19:20:33 +0000 (Mon, 20 Sep 2010)

Log Message:
-----------
Make PortalManager a ControlledThread subclass.

Modified Paths:
--------------
    rt^3/trunk/include/PortalManager.h
    rt^3/trunk/src/libNet/PortalManager.cxx

Modified: rt^3/trunk/include/PortalManager.h
===================================================================
--- rt^3/trunk/include/PortalManager.h  2010-09-20 19:14:55 UTC (rev 40620)
+++ rt^3/trunk/include/PortalManager.h  2010-09-20 19:20:33 UTC (rev 40621)
@@ -29,12 +29,24 @@
 #include "libutility.h"
 
 #include <Qt>
+#include "ControlledThread.h"
+#include "PkgTcpServer.h"
 
-class PortalManager
+class PortalManager : public ControlledThread
 {
 public:
        PortalManager(quint32 port);
        ~PortalManager();
+
+protected:
+       void _run();
+       void _runLoopPass();
+
+private:
+       quint32 port;
+       PkgTcpServer* tcpServer;
+
+       void makeFactoryJob(QByteArray* data);
 };
 
 #endif

Modified: rt^3/trunk/src/libNet/PortalManager.cxx
===================================================================
--- rt^3/trunk/src/libNet/PortalManager.cxx     2010-09-20 19:14:55 UTC (rev 
40620)
+++ rt^3/trunk/src/libNet/PortalManager.cxx     2010-09-20 19:20:33 UTC (rev 
40621)
@@ -24,15 +24,39 @@
  */
 
 #include "PortalManager.h"
+#include "NetMsgFactory.h"
+#include "PkgTcpClient.h"
 
-PortalManager::PortalManager(quint32 port)
+PortalManager::PortalManager(quint32 port) : ControlledThread("PortalManager")
 {
+  this->port = port;
+
+
+  this->tcpServer = new PkgTcpServer();
+
 }
 
 PortalManager::~PortalManager()
 {
 }
 
+void
+ControlledThread::_run()
+{
+
+  while (this->runCmd)
+    {
+      this->_runLoopPass();
+    }
+}
+
+void
+PortalManager::_runLoopPass()
+{
+  PkgTcpClient* client = (PkgTcpClient*) this->tcpServer->waitForClient(123);
+
+}
+
 // Local Variables:
 // tab-width: 8
 // mode: C++


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to