import java.net.* ;
import java.io.* ;

public class ClientCon {
  public static void main (String[] args) {
    String hostname = "127.0.0.1";
    Socket socket=null;
    BufferedReader in;
    String s;

    try {
      socket = new Socket (hostname, 4711);
      in = new BufferedReader 
        (new InputStreamReader 
          (socket.getInputStream() ) );
      while ( (s = in.readLine()) != null) {
        System.out.println (s);
      }
      in.close();
    } catch (Exception e) {
        System.out.println ("ClientCon " + e);
    }
    try { socket.close(); } catch (Exception ex) {}
  }
}

