private void connect(){
        try {
            server = new Socket(remote_host, remote_port);
            out = new PrintWriter(server.getOutputStream(), true);
            in = new BufferedReader(new InputStreamReader(server.getInputStream()));
        } catch (UnknownHostException e) {
            System.err.println("Don't know about host: " + remote_host);
            System.exit(1);
        } catch (IOException e) {
            System.err.println("Couldn't get I/O for the connection to: " + remote_host);
            System.exit(1);
        }
        System.out.println("Connected to " + remote_host);
    }