HttpClient 3 Timeout Description:
/* Timeout for fetching connections from the connection pool */connmanagerparams.settimeout (params, 1000);/* Connection Timeout */httpconnectionparams.setconnectiontimeout ( params, 2000);/* Request Timeout */httpconnectionparams.setsotimeout (params, 4000);
The first line sets Connectionpooltimeout: This defines the time-out period for removing a connection from the ConnectionManager managed connection pool, set here to 1 seconds.
The second line sets ConnectionTimeout: This defines the time-out for establishing a connection to the server over the network. In the HttpClient package, an asynchronous thread is created to create the socket connection to the server, which is the time-out for the socket, set to 2 seconds.
The third line sets the Sockettimeout: This defines the time-out time for the socket read data, that is, how long it takes for the response data to be fetched from the server, set to 4 seconds.
Three types of timeouts for httpclient