File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes Server Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Server" Watch "Server" New topic
Author

Server

Len Padson
Ranch Hand

Joined: Nov 21, 2011
Posts: 40
Is there any safe way to make a server, lets say for a chat program, that extends past just your own network, so someone ata different house could connect to it?
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10170
    
    8

Having a topic titled "Server" is not really helpful. Please UseAMeaningfulSubjectLine

Usually you would need a publicly accessible IP for the server. You would also need the port configured to accept connections.
This is not really a beginners question. Moving...


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
Len Padson
Ranch Hand

Joined: Nov 21, 2011
Posts: 40
Maneesh Godbole wrote:Having a topic titled "Server" is not really helpful. Please UseAMeaningfulSubjectLine

Usually you would need a publicly accessible IP for the server. You would also need the port configured to accept connections.
This is not really a beginners question. Moving...



Yeah, you're right... Sorry. Im new here

So basically, its not really possible with just aregular pc, without doing too much work?
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10170
    
    8

The PC (as in hardware) has nothing to do with it. You ca have the PC sitting on your kitchen top and it won't matter. What matters is the IP address.
Without having a public IP, how can the chat client(s) connect to the server?
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 18523
    
  40

Maneesh Godbole wrote:The PC (as in hardware) has nothing to do with it. You ca have the PC sitting on your kitchen top and it won't matter. What matters is the IP address.
Without having a public IP, how can the chat client(s) connect to the server?


I am assuming that you know that the OP doesn't have a public address from an earlier topic?

As Maneesh stated, and I'll elaborate. If your IP address is public, which is generally true for home PCs, then you are done -- it should just work. If you don't have a public address, which is true for home PCs, behind a router (which is common, as WIFI routers are cheap these days); which is generally true for work computers, behind a firewall (which is common); etc., then you will need to take a few minutes to do a bit of configs.

For your router, just log via the admin web page, and forward the port to the machine on your private network. For work, just send an email to your sys admin, asking for the same.

Len Padson wrote:
So basically, its not really possible with just aregular pc, without doing too much work?


I don't know what you mean by too much work. It only takes a few minutes to do -- the hard part is knowing what to do.

Henry

Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
Riaan Nel
Ranch Hand

Joined: Apr 23, 2009
Posts: 157

Len Padson wrote:
Maneesh Godbole wrote:
So basically, its not really possible with just aregular pc, without doing too much work?

Like the other posters said, it's not about the PC itself; it's about the PC being visible to the other PC or PCs that you want to access the server from. On a home network with static IPs, that's pretty straightforward.

See the tutorial.

If you want to access the server over the internet without getting a static IP address, you can use No-IP.


"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." - George Bernard Shaw
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Server
 
Similar Threads
Which Web Server?
USA&FRANCE Connection J2ME
Locking question
SEVERE: Servlet.service() for servlet jsp threw exception
performance issues with file read and write