THRIFT: configurable retry settings for bind

Summary: SO_REUSEADDR doesn't always work, and some of my servers have
expensive init routines that I really want to run before it becomes available
to services, so I want thrift to retry the bind several times at varied
intervals before giving up

Reviewed By: slee

Test Plan: running a service in GDB with no problems binding, with another
service bound to the port for all the retries, another service bound to the
port for only some of the retries


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665109 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/cpp/src/transport/TServerSocket.h b/lib/cpp/src/transport/TServerSocket.h
index edd2510..8d76fef 100644
--- a/lib/cpp/src/transport/TServerSocket.h
+++ b/lib/cpp/src/transport/TServerSocket.h
@@ -30,6 +30,9 @@
   void setSendTimeout(int sendTimeout);
   void setRecvTimeout(int recvTimeout);
 
+  void setRetryLimit(int retryLimit);
+  void setRetryDelay(int retryDelay);
+
   void listen();
   void close();
 
@@ -44,6 +47,8 @@
   int acceptBacklog_;
   int sendTimeout_;
   int recvTimeout_;
+  int retryLimit_;
+  int retryDelay_;
 
   int intSock1_;
   int intSock2_;