Interface ServerSentEventMessage
interface ServerSentEventMessage {
comment?: string;
data?: string;
event?: string;
id?: string | number;
retry?: number;
}
comment?: string;
data?: string;
event?: string;
id?: string | number;
retry?: number;
}
Properties
Optionalcomment
comment?: string
Ignored by the client.
Optionaldata
data?: string
The data field for the message. Split by new lines.
Optionalevent
event?: string
A string identifying the type of event described.
Optionalid
id?: string | number
The event ID to set the EventSource object's last event ID value.
Optionalretry
retry?: number
The reconnection time.
Represents a message in the Server-Sent Event (SSE) protocol.
See
https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#fields