Package-level declarations

A module with common code of Ktor WS Events project - Event delivery extensions for Ktor (Server/Client) over WebSocket protocol.

Types

Link copied to clipboard
interface AbstractEvent
Link copied to clipboard

Client parameters passed to the server. The parameters are only scoped to the connection. When firing an event, server can handle them.

Link copied to clipboard
typealias EventGroup = String

Event group is used to combine events of the same type. For example: "book_updated" or "book_created".

Link copied to clipboard
typealias EventPrincipal = String?

Event principal is used to combine events related to the same object. It could be any identifier of the object.

Link copied to clipboard
@Serializable
data class EventReference(val group: EventGroup, val principal: EventPrincipal = null, val parameters: ClientParameters = mapOf())

Event reference acts as a type for all events.

Link copied to clipboard
typealias Identifier = String
Link copied to clipboard
typealias UnixTime = Long

Properties

Link copied to clipboard

Functions

Link copied to clipboard
fun ref(group: EventGroup, principal: EventPrincipal = null, clientParameters: ClientParameters = mapOf()): EventReference

A shortcut.