• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

network connection in Wan network.

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic