java.net.ConnectException:无法连接到/192.168.10.110连接失败:ECONNREFUSED(连接被拒绝 [英] java.net.ConnectException: failed to connect to /192.168.10.110 connect failed: ECONNREFUSED (Connection refused

查看:1962
本文介绍了java.net.ConnectException:无法连接到/192.168.10.110连接失败:ECONNREFUSED(连接被拒绝的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

第一个问题:
我做的使用套接字编程。$ P $消息pviously它工作得很好,但目前它正显示出当我连接服务器和客户端同一路由器例外。

问题二:
如果我连接服务器和客户端不同的网络它不工作的客户端无法连接服务器的IP地址


解决方案

192.168.0.0/16是一个局域网地址块。<​​/ P>

此外,如果你的服务器的机器配置,而不​​是使用静态地址DHCP,它可能会收到一个不同的本地地址,每次你把它连接到(同)的路由器。

First problem: I am doing messaging using socket programming.Previously it worked fine but currently it is showing exception when I connect both server and client to same router .

Second problem: If I connect server and client to different networks it is not working client unable to connect server's ip address

解决方案

192.168.0.0/16 is a Local Area Network address block.

Moreover, if your server machine is configured to use DHCP instead of a static address, it may receive a different local address each time you connect it to the (same) router.

这篇关于java.net.ConnectException:无法连接到/192.168.10.110连接失败:ECONNREFUSED(连接被拒绝的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆