Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Server help?

 
Len Padson
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So, when you maek a ServerSocket, it sets the ip address to your ip address, right? so... like 192.168.1.1 or something. But with this, you can only network with computers on the same network. My question is: how can you make a ServerSocket that is available to computers on other servers. A practical example would be, a Chat Server so you could chat with a freind at another house.
 
Mohamed Sanaulla
Saloon Keeper
Posts: 3159
33
Google App Engine Java Ruby
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
query involves Sockets, hence moving it to Sockets forum.
 
Brian Burress
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When you instantiate a ServerSocket, you can optionally specify the ip address the socket binds (listens) to. The system you are running on will need to be addressable/accessible to the machine(s) you wish to connect from. The 192.* you specify is a private address so your friends pc can access it if you are able to give him/her access to your private network.

Baring that option, you'll want to find a way to expose your server system to the internet with a "public" IP address. Depending on your system and configuration just having a public ip address may not be enough (i.e. if you are running a firewall that blocks access, you may have to work with your router settings, etc). Do some searches on things like 'expose pc to internet' to get you started.

You'll also want to do some research into your options and the potential risks of doing so as you'll potentially open up your machine to access from anyone on the WWW.
 
Len Padson
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Brian Burress wrote:When you instantiate a ServerSocket, you can optionally specify the ip address the socket binds (listens) to. The system you are running on will need to be addressable/accessible to the machine(s) you wish to connect from. The 192.* you specify is a private address so your friends pc can access it if you are able to give him/her access to your private network.

Baring that option, you'll want to find a way to expose your server system to the internet with a "public" IP address. Depending on your system and configuration just having a public ip address may not be enough (i.e. if you are running a firewall that blocks access, you may have to work with your router settings, etc). Do some searches on things like 'expose pc to internet' to get you started.

You'll also want to do some research into your options and the potential risks of doing so as you'll potentially open up your machine to access from anyone on the WWW.




so theres no safe easy way to do it? haha
 
Pete Nelson
Ranch Hand
Posts: 147
Debian Eclipse IDE Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Len Padson wrote:so theres no safe easy way to do it? haha

Look for the person at the party who can't shut up about their home network. Make friends with them. Have them set it all up for you - it's not too hard, and it would give them something more to talk about at their next party.
 
Len Padson
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Pete Nelson wrote:
Len Padson wrote:so theres no safe easy way to do it? haha

Look for the person at the party who can't shut up about their home network. Make friends with them. Have them set it all up for you - it's not too hard, and it would give them something more to talk about at their next party.


haha very funny.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic