public void shutdownInput (final SocketChannel sc, final Callback.TCPClient cb) {
    
    if (   !sc.isConnected()      
        || !sc.isOpen()           
        || sc.socket().isClosed()
        || sc.socket().isInputShutdown()) {return;}

    if (this.isLoopThread()) {
        try { sc.socket().shutdownInput(); } 
        catch (IOException ioe) { cb.onError(this, sc, ioe); }
        return;
    }
    
    //
    // else
    //

    this.addTimeout(new Callback.Timeout() {
      public void go (TimeoutLoop loop) {
        // TODO cancel all write operations, or check.
        shutdownInput(sc, cb);
      }
    });
  }