diff --git a/lib/java/src/org/apache/thrift/transport/TSocket.java b/lib/java/src/org/apache/thrift/transport/TSocket.java index eb73e8e76e3..aef2a3ff8b6 100644 --- a/lib/java/src/org/apache/thrift/transport/TSocket.java +++ b/lib/java/src/org/apache/thrift/transport/TSocket.java @@ -114,6 +114,18 @@ public TSocket(String host, int port) throws TTransportException { this(new TConfiguration(), host, port, 0); } + /** + * Creates a new unconnected socket that will connect to the given host + * on the given port. + * + * @param host Remote host + * @param port Remote port + * @param timeout Socket timeout and connection timeout + */ + public TSocket(String host, int port, int timeout) throws TTransportException { + this(new TConfiguration(), host, port, timeout, timeout); + } + /** * Creates a new unconnected socket that will connect to the given host * on the given port.