开发者

Android Socket.netexception

I am getting an error saying that the network is unrerachable giving the error socket开发者_开发百科.net exception when I am connecting to a server which runs on my laptop from an app that runs on android phone


Try putting both the laptop and phone on the same wifi network; also use another computer to verify that the laptop's server is visible to other machine's on the network.

You generally will find it quite difficult to communicate between a phone on its mobile network and a PC on an end-user ISP's network, since both are likely firewalled and NAT'd in a way that makes incoming connections difficult even if you can determine the momentary IP address.

You might consider moving your server to a cloud server, which will cost you on the order of ten cents an hour during testing.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜