def send_connection_preface
      return unless @state == :waiting_connection_preface
      @state = :connected
      emit(:frame, CONNECTION_PREFACE_MAGIC)

      payload = @local_settings.reject { |k, v| v == SPEC_DEFAULT_CONNECTION_SETTINGS[k] }
      settings(payload)
    end
def send_connection_preface
      return unless @state == :waiting_connection_preface
      @state = :connected
      emit(:frame, CONNECTION_PREFACE_MAGIC)

      payload = @local_settings.reject { |k, v| v == SPEC_DEFAULT_CONNECTION_SETTINGS[k] }
      settings(payload)
    end
Emit the connection preface if not yet