android - AsyncHttpClient doesn't use the HTTPS port set in the constructor -


i'm trying change port i'm using https connection between android client , server, port doesn't set reason. initialize http client this:

// use port 8185 https client = new asynchttpclient(80, 8185); 

... exception:

org.apache.http.conn.httphostconnectexception: connection https://192.168.1.35 refused ... cause by: java.net.connectexception: failed connect /192.168.1.35 (port 443) after 10000ms: isconnected failed: econnrefused (connection refused) 

based on these errors, seems default port 443 still being used. why that? why can't use non-default port 8185?

edit: this library i'm using.

from i've read in javadocs , on lib website, perhaps try like:

asynchttpclientconfig cf = new asynchttpclientconfig.builder().setproxyserver(new proxyserver(proxyserver.protocol.https,"ip_address", 8185)).build(); asynchttpclient c = new asynchttpclient(cf); 

Comments

Popular posts from this blog

javascript - Google App Script ContentService downloadAsFile not working -

javascript - Function overwritting -

php - Find a regex to take part of Email -