public void connect(SocketAddress endpoint, int timeout) throws IOException {
verifyReceiveBufferSize();
// Here we intercept the connect and capture the start time.
DriverContext ctx = DriverContext.getContext();
if (ctx != null)
ctx.recordStartTime();
if (timeout <= 0)
timeout = 30000; // 30 second connect timeout.
super.connect(endpoint, timeout);
setSoTimeout(30000); // 30 second socket read timeout.
}