TypedServerSentEvent

data class TypedServerSentEvent<T>(    val data: T? = null,     val event: String? = null,     val id: String? = null,     val retry: Long? = null,     val comments: String? = null) : ServerSentEventMetadata<T>

Server-sent event with generic parameter data.

Report a problem

See also

with default String parameter data

Constructors

Link copied to clipboard
constructor(data: T? = null, event: String? = null, id: String? = null, retry: Long? = null, comments: String? = null)

Properties

Link copied to clipboard
open override val comments: String? = null

comment lines starting with a ':' character.

Link copied to clipboard
open override val data: T? = null

data field of the event.

Link copied to clipboard
open override val event: String? = null

string identifying the type of event.

Link copied to clipboard
open override val id: String? = null

event ID.

Link copied to clipboard
open override val retry: Long? = null

reconnection time, in milliseconds to wait before reconnecting.

Functions

Link copied to clipboard
fun toString(serializer: (T) -> String): String