[thrift] TSocketPool::addServer, c++ version

Summary: Same thing as the previous PHP change. Also includes a new constructor for easy building of a TSocketPool with a single host (for later filling in via addServer) without extra std::vector boxing/unboxing.

Reviewed By: mcslee

Test Plan: Synapse c++ client at r62896 uses this.

Revert: OK

TracCamp Project: Thrift

DiffCamp Revision: 909


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665297 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/cpp/src/transport/TSocketPool.h b/lib/cpp/src/transport/TSocketPool.h
index 0e30073..a197c72 100644
--- a/lib/cpp/src/transport/TSocketPool.h
+++ b/lib/cpp/src/transport/TSocketPool.h
@@ -37,11 +37,24 @@
    TSocketPool(const std::vector<std::pair<std::string, int> > servers);
 
    /**
+    * Socket pool constructor
+    *
+    * @param host single host
+    * @param port single port
+    */
+   TSocketPool(const std::string& host, int port);
+
+   /**
     * Destroyes the socket object, closing it if necessary.
     */
    virtual ~TSocketPool();
 
    /**
+    * Add a server to the pool
+    */
+   void addServer(const std::string& host, int port);
+
+   /**
     * Sets how many times to keep retrying a host in the connect function.
     */
    void setNumRetries(int numRetries);