Revision: 40652
          http://brlcad.svn.sourceforge.net/brlcad/?rev=40652&view=rev
Author:   davidloman
Date:     2010-09-22 19:19:59 +0000 (Wed, 22 Sep 2010)

Log Message:
-----------
Remove the write aspect of the PortalManager loop since writing to a FD's 
outgoing buffer is the job of the thread wanting to send info.  Cascade changes 
to Portal.  Introduce Portal::send(NetMsg*) in place of Portal::write()

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

Modified: rt^3/trunk/include/Portal.h
===================================================================
--- rt^3/trunk/include/Portal.h 2010-09-22 19:07:33 UTC (rev 40651)
+++ rt^3/trunk/include/Portal.h 2010-09-22 19:19:59 UTC (rev 40652)
@@ -28,42 +28,30 @@
 
 #define PKG_MAGIC2      5309
 
-#include <QtCore/QString>
 #include "PkgTcpClient.h"
+#include "NetMsg.h"
 #include "brlcad/pkg.h"
 
+#include <QtCore/QString>
+
 class Portal
 {
 public:
   friend class PortalManager;
   virtual ~Portal();
+  int send(NetMsg* msg);
 
-
   QString getRemoteNodeName();
 
 protected:
   Portal(PkgTcpClient* client);
 
-  /*
-    * Returns:
-    *          <0 on error
-    *          0 on EOF
-    *          1 on success
-    */
-   int readWrite();
    /*
       * Returns:
       *          <0 on error
       *          0 on EOF
       *          1 on success
       */
-   int write();
-   /*
-      * Returns:
-      *          <0 on error
-      *          0 on EOF
-      *          1 on success
-      */
    int read();
 
 

Modified: rt^3/trunk/src/libNet/Portal.cxx
===================================================================
--- rt^3/trunk/src/libNet/Portal.cxx    2010-09-22 19:07:33 UTC (rev 40651)
+++ rt^3/trunk/src/libNet/Portal.cxx    2010-09-22 19:19:59 UTC (rev 40652)
@@ -46,17 +46,12 @@
 
 
 int
-Portal::readWrite(){
+Portal::send(NetMsg* msg){
+//     this->pkgClient->send(PKG_MAGIC2,);
        return 1;
 }
 
 int
-Portal::write(){
-       //this->pkgClient->send();
-       return 1;
-}
-
-int
 Portal::read(){
 
   int retval = 0;

Modified: rt^3/trunk/src/libNet/PortalManager.cxx
===================================================================
--- rt^3/trunk/src/libNet/PortalManager.cxx     2010-09-22 19:07:33 UTC (rev 
40651)
+++ rt^3/trunk/src/libNet/PortalManager.cxx     2010-09-22 19:19:59 UTC (rev 
40652)
@@ -136,6 +136,9 @@
                                        }
                                }
                        }
+                       /*
+                        * Do we really need Write checking?
+                        *
                        if (FD_ISSET(i, &writefds)) {
                                //Portal->write here.
                                if (this->fdPortalMap->contains(i)) {
@@ -157,6 +160,7 @@
                                        continue;
                                }
                        }
+                       */
                } //end FOR
     } //end while
 }//end fn


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