import java.io.*; import java.net.*; import java.util.Vector; public class server{ static Vector kasutajad=new Vector(); public static void main(String argumendid[]) throws IOException{ ServerSocket ss=new ServerSocket(3001); while(true){ kasutajad.add(new Kasutaja(ss.accept())); } } static class Kasutaja extends Thread{ PrintWriter valja; Socket sc; public Kasutaja(Socket uus_sc){ sc=uus_sc; try{ valja=new PrintWriter(sc.getOutputStream(), true); }catch(Exception e){e.printStackTrace();} start(); } public void run(){ try{ BufferedReader sisse=new BufferedReader( new InputStreamReader(sc.getInputStream()) ); boolean veel=true; while(veel){ String rida=sisse.readLine(); System.out.println(rida); for(int i=0; i