URL url=new URL(urlstr);
URLConnection con=url.openConnection();
con.setConnectTimeout(3000);
con.setReadTimeout(3000);为何有很多连接了数十秒后才报告超时?狂晕.........
URLConnection con=url.openConnection();
con.setConnectTimeout(3000);
con.setReadTimeout(3000);为何有很多连接了数十秒后才报告超时?狂晕.........
//如获取长度
int len=con.getContentLength();
//教育网的可以测试下这个网址http://www.scutde.edu.cn/很多时候不会出现这个问题,但出现了就说明有原因why????
能否解决呢?