readTimeout

fun readTimeout(timeout: Long, unit: <Error class: unknown class>): OkHttpClient.Builder
fun readTimeout(duration: <Error class: unknown class>): OkHttpClient.Builder

Sets the default read timeout for new connections. A value of 0 means no timeout, otherwise values must be between 1 and Integer.MAX_VALUE when converted to milliseconds.

The read timeout is applied to both the TCP socket and for individual read IO operations including on Source of the Response. The default value is 10 seconds.

See also

Socket.setSoTimeout