This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
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 EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "Client/Server Socket Question" Watch "Client/Server Socket Question" New topic
Author

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
blacksmith
Ranch Hand

Joined: Mar 04, 2004
Posts: 1332
    
    1
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: http://aspose.com/file-tools
 
subject: Client/Server Socket Question
 
Similar Threads
Reading and writing
Server/Client On Separate Machines
simple socket programming
how to connect to other machine rather than localhost.
java.net Socket port number question