THRIFT-1305. cpp: make TConnection a private inner class of
TNonblockingServer

The previous patch reverted some elements of THRIFT-1217. Fixed.

Patch: Alexandre Parenteau

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1164161 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/cpp/src/server/TNonblockingServer.h b/lib/cpp/src/server/TNonblockingServer.h
index e4e0e64..5cda2c5 100644
--- a/lib/cpp/src/server/TNonblockingServer.h
+++ b/lib/cpp/src/server/TNonblockingServer.h
@@ -30,7 +30,9 @@
 #include <string>
 #include <errno.h>
 #include <cstdlib>
+#ifdef HAVE_UNISTD_H
 #include <unistd.h>
+#endif
 #include <event.h>
 
 namespace apache { namespace thrift { namespace server {
@@ -663,7 +665,7 @@
    *
    * @return write fd for pipe.
    */
-  int getNotificationSendFD() const {
+  evutil_socket_t getNotificationSendFD() const {
     return notificationPipeFDs_[1];
   }
 
@@ -672,7 +674,7 @@
    *
    * @return read fd of pipe.
    */
-  int getNotificationRecvFD() const {
+  evutil_socket_t getNotificationRecvFD() const {
     return notificationPipeFDs_[0];
   }