code: private void doConnect(final Message<JsonObject> message) {
      if (open) {
        if (!connected) {
          groups.clear();
          connected = true;
        }
        message.reply(true);
        log.debug(String.format("%s - Accepted connect request from %s", this, context.source()));
      } else {
        message.reply(false);
        log.debug(String.format("%s - Rejected connect request from %s, connection not open", this, context.source()));
      }
    }
docs: Handles connect.