while (true) {
try {
System.out.println("SocketServer waiting for connection");
Socket s = ss.accept();
BufferedReader is = new BufferedReader(
new InputStreamReader(s.getInputStream()));
String name = is.readLine();
String passwd = is.readLine();
String domain = is.readLine();
PrintWriter pout = new PrintWriter(s.getOutputStream(), true);
pout.println("Welcome to " + domain + ", " + name);
} catch (IOException e) {
System.err.println("Oh, dear me! " + e);
}
}