!747 m { static int chatPort = 9751; p { autoReportToChatOff(); startChatServerIfNotUp(); waitForChatServer(); final Socket s = new Socket("localhost", chatPort+1); print("connected to chat"); reportToChat("Hey ho I'm sucking!"); final BufferedReader in = new BufferedReader( new InputStreamReader(s.getInputStream(), "UTF-8")); int n = 0; while (true) { S line = in.readLine(); if (line == null) break; // shouldn't happen if (line.length() == 0) break; // ok print("chat> " + line); ++n; } s.close(); print("Lines sucked: " + n); } }