• Post Reply Bookmark Topic Watch Topic
  • New Topic


Tim Adam Cooper
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am currently learning about Networking and Sockets to prepare for my Sun Java Development exam.
Below is a scenairo about networking:
If a company has five computers all connected via a network as below:
Computer�s Name Type of Computer
Comp1 Windows NT Server
Comp2 Windows NT Server
Comp3 Windows NT Workstation
Comp4 Windows NT Workstation
Comp5 Windows NT Workstation

Below is a program that uses a ServerSocket class to create a Server:
import java.net.*;
import java.io.*;
public class SimpleServer {
public static void main(String args[]){
ServerSocket s = null;
Socket s1;
String sendString="Hello from the Server";
OutputStream slout;
DataOutputStream dos;
s=new ServerSocket(5432);
System.out.println("Server ready");
}catch(IOException e){}
dos=new DataOutputStream(slout);
}catch(IOException e){}
The question that I would like to ask is must the Server program above be placed in a Server computer (Comp1 and Comp2) or is it OK to put the Server program in a Workstation (Comp3, Comp4 and Comp5) and the Workstation can acts as a server? So for example, can I put the Server program in Comp3 (Workstation) so that Comp3 can acts as a Server to Comp4 (Workstation) and Comp5 (Workstation) ?
Manish Hatwalne
Ranch Hand
Posts: 2596
Android Firefox Browser Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can run your server program anywhere u want, including workstations. What's more, u can even run ur server and client on the same machine.
- Manish
my overalls have superpowers - they repel people who think fashion is important. Tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!