Java socket timeout: How to set the timeout on a Java socket
Briefly

Enable/disable SO_TIMEOUT with the specified timeout, in milliseconds. A read() call on the InputStream associated with this Socket will block for only this amount of time. If the timeout expires, a java.net.SocketTimeoutException is raised.
Some programmers prefer expressing timeouts in milliseconds like 10*1000 for readability and intention clarity, despite being unconventional for others.
Read at Alvinalexander
[
add
]
[
|
|
]