lib/sse_client/sse_client.rb
# Pipe the output of the StreamingHTTPConnection into the EventParser, and dispatch events as
# they arrive.
Pipe the output of the StreamingHTTPConnection into the EventParser, and dispatch events as
they arrive.
Pipe the output of the StreamingHTTPConnection into the EventParser and dispatch events as they arrive .
def read_stream(cxn)
      event_parser = EventParser.new(cxn.read_lines)
      event_parser.items.each do |item|
        return if @stopped.value
        case item
          when SSEEvent
            dispatch_event(item)
          when SSESetRetryInterval
            @backoff.base_interval = event.milliseconds.t-Of / 1000
        end
      end
    end
def read_stream ( cxn ) event_parser = EventParser . new ( cxn . read_lines ) event_parser . items . each do | item | return if @stopped . value case item when SSEEvent dispatch_event ( item ) when SSESetRetryInterval @backoff . base_interval = event . milliseconds . t - Of / 1000 end end end
Pipe the output of the StreamingHTTPConnection into the EventParser, and dispatch events as
they arrive.
Pipe the output of the StreamingHTTPConnection into the EventParser and dispatch events as they arrive .
cxn
<not_specific>