Class: SSE::StreamEvent
- Inherits:
-
Struct
- Object
- Struct
- SSE::StreamEvent
- Defined in:
- lib/ld-eventsource/events.rb
Overview
Server-Sent Event type used by Client. Use Client#on_event to receive events.
Instance Attribute Summary collapse
-
#data ⇒ String
The string that appeared after
data:in the stream; if there were multipledata:lines, they are concatenated with newlines. -
#id ⇒ String
The string that appeared after
id:in the stream if any, or nil. -
#last_event_id ⇒ String
The
id:value that was most recently seen in an event from this stream; this differs from theidproperty in that it retains the same value in subsequent events if they do not provide their ownid:. -
#type ⇒ Symbol
The string that appeared after
event:in the stream; defaults to:messageifevent:was not specified, will never be nil.
Instance Attribute Details
#data ⇒ String
19 |
# File 'lib/ld-eventsource/events.rb', line 19 StreamEvent = Struct.new(:type, :data, :id, :last_event_id) |
#id ⇒ String
19 |
# File 'lib/ld-eventsource/events.rb', line 19 StreamEvent = Struct.new(:type, :data, :id, :last_event_id) |
#last_event_id ⇒ String
19 |
# File 'lib/ld-eventsource/events.rb', line 19 StreamEvent = Struct.new(:type, :data, :id, :last_event_id) |
#type ⇒ Symbol
19 |
# File 'lib/ld-eventsource/events.rb', line 19 StreamEvent = Struct.new(:type, :data, :id, :last_event_id) |