If the server never send EOF, will InputStream.read hang?
How to set the read timeout?
If the server never send EOF, will InputStream.read hang?
How to set the read timeout?
How about setting a socket timeout. It sets the timeout on all the read operations on that socket