Reputation: 2769
I created a ServerSocket made it to listen to a particular port.If i use an app which runs on my mobile i shld use my public IP and make my router forwd to my local IP. Wht port no. in router shld i forward ?
Upvotes: 0
Views: 858
Reputation: 31038
You haven't provided a lot of details to go on so I'll make a few assumptions:
In this scenario, you will forward port 9923 from your router to your Android's IP address. Put another way, any incoming packets destined for port 9923 on your public IP address will get forwarded to port 9923 on your Android's IP address.
Now if you're attempting to do with over 3G, be aware that not all carriers allow you to listen on certain ports or keep sockets open, so this is something to keep in mind.
Upvotes: 1