Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

i have a connection timeout problem with proxy

807580Jan 7 2010 — edited Jan 7 2010
Proxy proxy=new Proxy(Proxy.Type.SOCKS,new InetSocketAddress("85.105.238.24",1080));
    String url="http://www.google.com";
    HttpURLConnection conn=(HttpURLConnection)new URL(url).openConnection(proxy);
    conn.setConnectTimeout(10*1000);
    conn.setReadTimeout(10*1000);
    conn.connect();
above is the code,why it can't catch timeout,it just connecting always,no response.
i tried httpclient also,it's the same problem.
i tried some proxy tester software(exe written on c++),all work fine
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 4 2010
Added on Jan 7 2010
16 comments
803 views