import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;
public class Server {
public static void main(String[] args) {
Socket s = null;
ServerSocket ss = null;
try {
ss = new ServerSocket(5555);
while (true) {
s = ss.accept();
new MyThread(s).start();
}
} catch (Exception ex) {
ex.printStackTrace();
} finally {
try {
ss.close();
} catch (IOException e) {
System.out.println(e.getMessage());
}
}
}
}