Better socket timeout and options support for Thrift C++

Summary: Also compile without degugging symbols for the linked library

Reviewed By: aditya


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664810 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/cpp/src/transport/TServerSocket.h b/lib/cpp/src/transport/TServerSocket.h
index 29cfdfe..496d540 100644
--- a/lib/cpp/src/transport/TServerSocket.h
+++ b/lib/cpp/src/transport/TServerSocket.h
@@ -17,8 +17,13 @@
 class TServerSocket : public TServerTransport {
  public:
   TServerSocket(int port);
+  TServerSocket(int port, int sendTimeout, int recvTimeout);
+
   ~TServerSocket();
 
+  void setSendTimeout(int sendTimeout);
+  void setRecvTimeout(int recvTimeout);
+
   void listen();
   void close();
 
@@ -26,10 +31,11 @@
   shared_ptr<TTransport> acceptImpl();
 
  private:
-
   int port_;
   int serverSocket_;
   int acceptBacklog_;
+  int sendTimeout_;
+  int recvTimeout_;
 };
 
 }}} // facebook::thrift::transport