• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

network connection in Wan network.

 
Itamar Levi
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I am trying establish a server (my android phone) client(my computer at home) connection.
My computer is in Lan network. so i could overcome the issue of starting a connection within the Lan network.

Because of the NAT mechanism i tried to create the android mobile as a server and my computer as a client, my computer will start the connection to the android mobile.

I created the server in my mobile with ServerSocket
I found my android ip address in web like www.whatsismyip.com

It is not working. the client(my computer) can't find the server(my phone).
(I know this not recomended architecture)
What is wrong? why is it not working? why the client can't connect to the server?

Thank's
Itamar.
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Using a mobile device as a server is not a particularly good idea, as you seem to realize. Whether it is accessible depends on the network it's on - mobile networks generally will not allow inbound connections. If it's connected via Wifi then accessibility depends on what kinds of firewalls and routers are between the client and the device.
 
Itamar Levi
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If we take a look about android applications which receive notification (like mail araivel on gmail or message from WhatsUp chat)
does It means that necessarily the client (android phone) has to initiate the first connection to the server? (in order to register in the NAT tables in the router)?

If it's true. so every time the client(android phone) change to different WIFI network it has to perform a process of register all its application (which get notifications)
to their servers?

Itamar?
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The applications probably don't particularly care over which network they run- that's up to the device's networking stack.

As to notifications - my guess would be that they're delivered over GSM (or CDMA) via a gateway Google has in place.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic