method

perform_write

Importance_0
v5.2.3 - Show latest stable - 0 notes - Class: SSE
perform_write(json, options) private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File actionpack/lib/action_controller/metal/live.rb, line 111
        def perform_write(json, options)
          current_options = @options.merge(options).stringify_keys

          WHITELISTED_OPTIONS.each do |option_name|
            if (option_value = current_options[option_name])
              @stream.write "#{option_name}: #{option_value}\n"
            end
          end

          message = json.gsub("\n".freeze, "\ndata: ".freeze)
          @stream.write "data: #{message}\n\n"
        end
Register or log in to add new notes.