Grip::ServerSent::Stream
Constructors
new(context : HTTP::Server::Context, capacity : Int32 = 100, strategy : Strategy = Strategy::DropOldest)
SourceInstance methods
Keeps the SSE handler fiber alive by sending periodic heartbeats.
capacity
Sourceclose
Sourcecontext
Sourceemit(type : Event::Type, data : T = nil, *, id : String | Int | Nil = nil, retry : Time::Span | Nil = nil) : self forall T
Sourcesend(data : String, *, event : String | Nil = nil, id : String | Int | Nil = nil, retry : Time::Span | Nil = nil) : self
Formats and enqueues the payload without blocking the caller fiber (unless using strategy: Block).
strategy
Source