Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

android set socket timeout

// see https://developer.android.com/reference/java/net/Socket#setSoTimeout(int)

try {
  mSocket.setSoTimeout(10*1000);
  // OR
  mSocket.connect(address, 10*1000);
} catch (SocketTimeoutException e) {
  // on timeout
}
Comment

PREVIOUS NEXT
Code Example
Java :: jaspersoft masking 
Java :: add words from string to collection java 
Java :: regex pattern for car plates 
Java :: val kotlin to Java 
Java :: como detener un void java 
Java :: java reverse nodes with single node 
Java :: Why String is popular HashMap key in Java? 
Java :: informaticapc 
Java :: print map in java log 
Java :: buat tetris dari java 
Java :: reference value in array list java syntax 
Java :: java replace nans with 0 csv line 
Java :: custom class level annotation in spring 
Java :: Java socket connect to gmail 
Java :: java operator 
Java :: boolean parse jtextfield 
Java :: staging and production environment logging spring boot 
Java :: imagebutton get background color programmatically 
Java :: image primitive 
Java :: get top 3 entries based on values map java 
Java :: Java remove element in a array - set to null 
Java :: Uri/Beecrowd Problem no - 1185 Solution in Java 
Java :: how to get the current location in android 
Java :: Reference in java equal operator 
Java :: why is write replacing my text java 
Java :: java trim unicode u200b 
Java :: hide frame ( acces to the top level component ) 
Java :: why use var in java 
Java :: fibonancci using dynamic programming in java 
Java :: java singly linked list example 2 res 
ADD CONTENT
Topic
Content
Source link
Name
7+8 =