• 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

Server help?

 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Bartender
Posts: 3225
34
IntelliJ IDE Oracle Spring Chrome Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
query involves Sockets, hence moving it to Sockets forum.
 
Ranch Hand
Posts: 143
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 147
Eclipse IDE Tomcat Server Debian
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Today you are you, that is turer than true. There is no one alive who is youer than you! - Seuss. Tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic