File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Sockets and Internet Protocols and the fly likes Client/Server Socket Question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "Client/Server Socket Question" Watch "Client/Server Socket Question" New topic

Client/Server Socket Question

Daniel Simpson
Ranch Hand

Joined: Sep 02, 2004
Posts: 181
Hey, I'm just learning about how to do socket networking in Java and I had a question. I wrote a program that contains a simple client/server application where the client and server can talk back and forth. I've tested it on my computer, but I was wondering how I actually have it run from my website. I want to have my server class on the server i'm using, and when i run my client class from my computer, it connects to the server class on my site. How would I go about doing that, so my server class is already executing when i attempt to connect with the client? thanks!

SCJP 1.4<br />SCJD 1.4
Warren Dew
Ranch Hand

Joined: Mar 04, 2004
Posts: 1332
Your server is hosted by someone else, right?

You will need to upload your server application to the server host machine, then log in to that machine and run your server application (or have someone there do it). Once it's running, you can try connecting with your client.

Note that some web site hosting providers only permit hosting of web sites, and don't allow you to run your own server applications.
I agree. Here's the link:
subject: Client/Server Socket Question
It's not a secret anymore!