java.net.ConnectException: Connection refused: connect解决方法!
点击右边红色标题查看本文完整版:java.net.ConnectException: Connection refused: connect解决方法!
java.net.ConnectException: Connection refused: connect
防火墙关了,
------解决方法--------------------
for(int i=1024; i <65535; i++){
Socket theSocket=new Socket(hostname,i);
System.out.println( "the port: " + i + "is open ");
}
扫描端口不是像你这样扫的,假如你的服务端没有打开1024端口,你就会马上收到connect refuse,并中断循环。