Bin Chen
Bin Chen

Reputation: 63299

gprs gateway: why I can't connect to my server?

I am developing android phone application, communicate with my server. My server program listens on port 9999. If I use the wifi connection, everything is fine, but if I switch to GPRS connection, the client can't reach the server.

By tcpdumping the packet, I found when GPRS is enabled, every packet goes to the GPRS gateway with 80 port.

I am wondering what I should do to make my client be able to reach 9999 port of my server in GPRS case?

Upvotes: 1

Views: 596

Answers (1)

Nikola Despotoski
Nikola Despotoski

Reputation: 50538

Can your server be reached by its IP? Try to connect to it with IP:port pair, where you specify desired port

http://developer.android.com/reference/java/net/InetAddress.html http://developer.android.com/reference/java/net/InetSocketAddress.html

Upvotes: 1

Related Questions