Thrift: C++ peek() method and TException not Exception
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664876 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/cpp/src/transport/TSocket.h b/lib/cpp/src/transport/TSocket.h
index b946b6a..8137984 100644
--- a/lib/cpp/src/transport/TSocket.h
+++ b/lib/cpp/src/transport/TSocket.h
@@ -2,6 +2,7 @@
#define _THRIFT_TRANSPORT_TSOCKET_H_ 1
#include <string>
+#include <sys/time.h>
#include "TTransport.h"
#include "TServerSocket.h"
@@ -45,6 +46,11 @@
bool isOpen();
/**
+ * Calls select on the socket to see if there is more data available.
+ */
+ bool peek();
+
+ /**
* Creates and opens the UNIX socket.
*
* @throws TTransportException If the socket could not connect
@@ -131,6 +137,9 @@
/** Nodelay */
bool noDelay_;
+
+ /** Recv timeout timeval */
+ struct timeval recvTimeval_;
};
}}} // facebook::thrift::transport