return socket.isConnected();
if (connectionPending) return false; try { InetSocketAddress remote = channel.getPeerAddress(); return remote != null; } catch (IOException ioe) { ioe.printStackTrace(System.out); return false; }
  public boolean isConnected ()  {    return socket.isConnected();  }