add increase_max_fds to the new TServer.cpp

Summary: - added TServer.cpp
         - increase_max_fds() defaults to 2^24.

Reviewed By: dreiss

Test Plan: - Linked this code into chatloggerd and verified the return value.

Revert: OK

TracCamp Project: Chirp

DiffCamp Revision: 8275


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665500 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/cpp/src/server/TServer.h b/lib/cpp/src/server/TServer.h
index d7245c7..f05b2eb 100644
--- a/lib/cpp/src/server/TServer.h
+++ b/lib/cpp/src/server/TServer.h
@@ -188,6 +188,14 @@
 
 };
 
+/**
+ * Helper function to increase the max file descriptors limit
+ * for the current process and all of its children.
+ * By default, tries to increase it to as much as 2^24.
+ */
+ int increase_max_fds(int max_fds=(1<<24));
+
+
 }}} // facebook::thrift::server
 
 #endif // #ifndef _THRIFT_SERVER_TSERVER_H_