Method: Frontline::Index#get_streamer

Defined in:
lib/frontline/controllers/index.rb

#get_streamer(uuid) ⇒ Object

backend for EventSource requests. it is storing the socket into memory so it can be used later to send data to browser. sockets are identified by the given ID.



47
48
49
50
51
52
# File 'lib/frontline/controllers/index.rb', line 47

def get_streamer uuid
  evented_stream do |s|
    STREAMS[uuid] = s
    s.errback { STREAMS.delete uuid }
  end
end