I have two Real Ip address 220.xx.xxx.xxx in my work place. I tried to make a simple java tcp server program and android tcp client program. The android client works fine when:
- Server and emulator program in the same pc.
- Server in one pc having real IP address emulator is in another pc with a real ip address.
- Server and emulator both within under private network within same pc or different pc or device.
does not work when:
- client is a smart phone having wifi or 3g network, and server have a real IP address on different network.
- client is an emulator running on wifi connected device, server have a real ip address.
So, how to connect to a Java TCP server socket having Public IP From Android Tcp Client Socket? I dont think pasting code is really necessary here. However if some one ask I can provide. According to my search on the internet some people provide suggestion to configuring the router on the server side. this seems to me little bit annoying. if I run a websever it can be accessed from anywhere any place.
Aucun commentaire:
Enregistrer un commentaire