public class TestIp {
public static void main(String[] args) {
Socket connect = new Socket();

try {
connect.connect(new InetSocketAddress("192.168.0.59", 8071),100);

boolean res = connect.isConnected();
System.out.println("" + res);
} catch (IOException e) {
e.printStackTrace();
}finally{
try {
connect.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
}

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-11-29
  • 2022-12-23
  • 2021-12-09
  • 2021-12-09
  • 2021-11-29
  • 2022-02-08
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-11-29
  • 2022-01-20
  • 2021-10-27
  • 2022-02-08
  • 2022-12-23
相关资源
相似解决方案