Program
Client Program
————————–
import java.net.*;
import java.io.*;
public class Server{
ServerSocket server=null;
public Server(){
try{
server=new ServerSocket(1001);
processRequest();
}catch(Exception e){System.out.println(e);}
}
public void processRequest(){
while(true){
try{
Socket client=server.accept();
NewSocket Client=new NewSocket(client);
}
catch(Exception ee){System.out.println(ee);}
}
}
public static void main(String args[]){
new Server();
}