Struct ServerSentEvent<T>
One event an SSE operation's handler yields: its data and its SSE id (null sends it
without one, e.g. heartbeats, so clients' Last-Event-ID never points at it).
public readonly record struct ServerSentEvent<T> : IEquatable<ServerSentEvent<T>>
Type Parameters
T
- Implements
- Inherited Members
Constructors
ServerSentEvent(T, string?)
One event an SSE operation's handler yields: its data and its SSE id (null sends it
without one, e.g. heartbeats, so clients' Last-Event-ID never points at it).
public ServerSentEvent(T Data, string? Id = null)
Parameters
DataTIdstring
Properties
Data
public T Data { get; init; }
Property Value
- T
Id
public string? Id { get; init; }