code: public void onDisconnect() {
          input.setDisabled(true);
          sendingButton.setDisabled(true);
          connectingButton.setDisabled(false);
          disconnectingButton.setDisabled(true);
      }
docs: Disables sending widgets. Enables connecting widgets.