private void display(String msg) {
   if (cg == null) {
     System.out.println(msg);
   } else {
     cg.append(msg + "\n");
   }
 }
Exemple #2
0
  private void disconnect() {
    try {
      if (sInput != null) sInput.close();
    } catch (Exception e) {
    }
    try {
      if (sOutput != null) sOutput.close();
    } catch (Exception e) {
    }
    try {
      if (socket != null) socket.close();
    } catch (Exception e) {
    }

    if (cg != null) cg.connectionFailed();
  }