jangidipramod / android-xmlrpc

Automatically exported from code.google.com/p/android-xmlrpc
0 stars 0 forks source link

Set the default socket and connection timeout #33

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
please add this:

public void setTimeout(int socket_timeout, int connection_timeout){
        HttpConnectionParams.setSoTimeout(httpParams,socket_timeout);
        HttpConnectionParams.setConnectionTimeout(httpParams,connection_timeout);
    }

to XMLRPCClient.java the default timeout is 0 that mean unlimited, this allow 
to set the desidered connection and socket timeout and avoid to hang if there 
are problems to the xmlrpc server or network problems,

thanks
Nicola Murino

Original issue reported on code.google.com by nicola.m...@gmail.com on 3 Jan 2012 at 11:11