Revision: 41752
          http://brlcad.svn.sourceforge.net/brlcad/?rev=41752&view=rev
Author:   davidloman
Date:     2010-12-22 12:59:39 +0000 (Wed, 22 Dec 2010)

Log Message:
-----------
Implement PingMsg handling in GeometryService class.  Precursor to KeepAlive 
functionality.

Modified Paths:
--------------
    rt^3/trunk/src/GS/GeometryService.cxx

Modified: rt^3/trunk/src/GS/GeometryService.cxx
===================================================================
--- rt^3/trunk/src/GS/GeometryService.cxx       2010-12-22 12:59:05 UTC (rev 
41751)
+++ rt^3/trunk/src/GS/GeometryService.cxx       2010-12-22 12:59:39 UTC (rev 
41752)
@@ -55,6 +55,8 @@
 {
        NetMsgRouter* router = NetMsgRouter::getInstance();
 
+       router->registerType(PING, this);
+
        router->registerType(NEWSESSIONREQ, SessionManager::getInstance());
        //router->registerType(SESSIONINFO, SessionManager::getInstance());
        router->registerType(DISCONNECTREQ, SessionManager::getInstance());
@@ -105,14 +107,29 @@
                this->portalMan->terminate(false);
                this->terminate(false);
                return true;
+       case PING:
+               Portal* p = msg->getOrigin();
+
+               if (p != NULL) {
+                       remNodeName = p->getRemoteNodeName();
+                       log->logINFO("GeometryService", "PING from: '" + 
remNodeName + "'");
+                       PongMsg pongMsg((PingMsg*)msg);
+                       p->send(pongMsg);
+               } else {
+                       log->logINFO("GeometryService", "Can't return ping.  
NULL Portal*");
+               }
+
+               return true;
        }
        return false;
 }
 
-// Local Variables: ***
-// mode: C++ ***
-// tab-width: 8 ***
-// c-basic-offset: 2 ***
-// indent-tabs-mode: t ***
-// End: ***
-// ex: shiftwidth=2 tabstop=8
+/*
+ * Local Variables:
+ * tab-width: 8
+ * mode: C
+ * indent-tabs-mode: t
+ * c-file-style: "stroustrup"
+ * End:
+ * ex: shiftwidth=4 tabstop=8
+ */


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

------------------------------------------------------------------------------
Forrester recently released a report on the Return on Investment (ROI) of
Google Apps. They found a 300% ROI, 38%-56% cost savings, and break-even
within 7 months.  Over 3 million businesses have gone Google with Google Apps:
an online email calendar, and document program that's accessible from your 
browser. Read the Forrester report: http://p.sf.net/sfu/googleapps-sfnew
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to