ssl - HttpsUrlConnection with SSLSocketFactory class takes too long to connect in Android -
i want utilize tls protocol httpsurlconnection
in android. this, overriding sslsocketfactory
class , setting tls protocol using setenabledprotocol()
method. setting sslsocketfactory
in httpsurlconnection
using connection.setsslsocketfactory()
method.
httpsurlconnection conn = (httpsurlconnection) url.openconnection(); sslsocketfactoryex socketfactory = new sslsocketfactoryex(); conn.setsslsocketfactory(socketfactory); conn.connect();
here sslsocketfactoryex custom class inheriting sslsocketfactory class. within sslsocketfactoryex
class, setting setenabledprotocol()
method tls protocol.
now problem when utilize sslsocketfactory
class, httpsurlconnection
takes more sec connect. per below link, there bug related reverse dns in android due takes time. followed approach described there prepare issue still slow. https://code.google.com/p/android/issues/detail?id=13117
is there way can improve performance?
android ssl httpurlconnection androidhttpclient
No comments:
Post a Comment