android set socket timeout

Solutions on MaxInterview for android set socket timeout by the best coders in the world

showing results for - "android set socket timeout"
Léonie
25 Jul 2018
1// see https://developer.android.com/reference/java/net/Socket#setSoTimeout(int)
2
3try {
4  mSocket.setSoTimeout(10*1000);
5  // OR
6  mSocket.connect(address, 10*1000);
7} catch (SocketTimeoutException e) {
8  // on timeout
9}
similar questions
queries leading to this page
android set socket timeout