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

Log Message:
-----------
Add a FileDescriptor getter for PkgClient::pkg_conn.pkc_fd

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

Modified: rt^3/trunk/include/PkgClient.h
===================================================================
--- rt^3/trunk/include/PkgClient.h      2010-09-22 12:54:27 UTC (rev 40639)
+++ rt^3/trunk/include/PkgClient.h      2010-09-22 13:39:10 UTC (rev 40640)
@@ -35,17 +35,14 @@
 public:
   PkgClient(std::string proto, std::string ipOrHostname, int port, struct 
pkg_switch* callBackTableIn);
   PkgClient(std::string proto, pkg_conn* conn);
-  virtual
-  ~PkgClient();
+  virtual ~PkgClient();
 
-  bool
-  hasGoodConnection();
+  bool hasGoodConnection();
 
   /*
    * Blocks until a specific opcode has been received on the connection
    */
-  char*
-  waitForMsg(int opcode);
+  char* waitForMsg(int opcode);
 
   /*
    * Attempts to route data in buffer to the appropriate call back.
@@ -54,8 +51,7 @@
    *          0 on EOF
    *          >0 on success
    */
-  int
-  processData();
+  int processData();
 
   /*
    * Attempts to pull data off of the associated
@@ -65,16 +61,16 @@
    *          0 on EOF
    *          >0 on success
    */
-  int
-  pullDataFromSocket();
+  int pullDataFromSocket();
 
-  void
-  close();
+  void close();
 
-  int
-  send(int opcode, const char* buffer, size_t bufferLen);
+  int send(int opcode, const char* buffer, size_t bufferLen);
 
   void setCallBackTable(struct pkg_switch* callback);
+
+  int getFileDescriptor();
+
 private:
   std::string proto;
   pkg_conn* conn;

Modified: rt^3/trunk/src/libPkgCpp/PkgClient.cxx
===================================================================
--- rt^3/trunk/src/libPkgCpp/PkgClient.cxx      2010-09-22 12:54:27 UTC (rev 
40639)
+++ rt^3/trunk/src/libPkgCpp/PkgClient.cxx      2010-09-22 13:39:10 UTC (rev 
40640)
@@ -98,6 +98,12 @@
   this->conn->pkc_switch = callback;
 }
 
+int
+PkgClient::getFileDescriptor()
+{
+  return this->conn->pkc_fd;
+}
+
 /*
  * Local Variables:
  * 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