Revision: 40258
          http://brlcad.svn.sourceforge.net/brlcad/?rev=40258&view=rev
Author:   davidloman
Date:     2010-08-19 19:20:18 +0000 (Thu, 19 Aug 2010)

Log Message:
-----------
Modify PkgServer to take a Protocol argument, thus setting it to either TCP or 
UDP.

Modified Paths:
--------------
    rt^3/trunk/include/PkgServer.h
    rt^3/trunk/src/libPkgCpp/PkgServer.cxx

Modified: rt^3/trunk/include/PkgServer.h
===================================================================
--- rt^3/trunk/include/PkgServer.h      2010-08-19 19:18:50 UTC (rev 40257)
+++ rt^3/trunk/include/PkgServer.h      2010-08-19 19:20:18 UTC (rev 40258)
@@ -32,7 +32,7 @@
 class PkgServer
 {
 public:
-    PkgServer(pkg_switch callbacks[]);
+    PkgServer(std::string proto, pkg_switch callbacks[]);
     virtual ~PkgServer();
 
     bool listen(unsigned short port);
@@ -44,6 +44,7 @@
 
 
 private:
+    std::string proto
     int listenFD;
     pkg_switch* callBackTable;
 };

Modified: rt^3/trunk/src/libPkgCpp/PkgServer.cxx
===================================================================
--- rt^3/trunk/src/libPkgCpp/PkgServer.cxx      2010-08-19 19:18:50 UTC (rev 
40257)
+++ rt^3/trunk/src/libPkgCpp/PkgServer.cxx      2010-08-19 19:20:18 UTC (rev 
40258)
@@ -45,8 +45,7 @@
   int fd;
   snprintf(portCString, 6, "%d", port);
 
-  fd = pkg_permserver(portCString, "tcp", 0, 0);
-  //TODO Make this more robust.  TCP being hardcoded is bad.
+  fd = pkg_permserver(portCString, this->proto, 0, 0);
 
   if (fd < 0)
     return false;


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

------------------------------------------------------------------------------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to