public void start() throws IOException {
    if (started == false) {
      started = true;
      connection = new Socket(HOST_NAME, HOST_PORT);
      ObjectOutputStream output = new ObjectOutputStream(connection.getOutputStream());
      output.flush();
      ObjectInputStream input = new ObjectInputStream(connection.getInputStream());
      startInputThread(input);
      startOutputThread(output);
    }
  }