abla/websocket/json

Generated from source.

Import with import "abla/websocket/json".

Source: abla/websocket/json/entry.ab

WebSocketJsonMessage (class)

class WebSocketJsonMessage(
    val value: Json,
    val available: bool,
    val closed: bool,
    val timedOut: bool,
    val error: string
)

Carries a decoded value or the closure, timeout or error state of a JSON read.

WebSocketConnection.sendJson (extension fun)

fun WebSocketConnection.sendJson(value: Json): bool

Serializes the value as a text message and returns whether the send succeeded.

WebSocketConnection.readJson (extension fun)

fun WebSocketConnection.readJson(
    limits: JsonLimits = jsonDefaultLimits(),
    timeoutMilliseconds: int = 30000
): WebSocketJsonMessage

Reads and parses a bounded text message, reporting parse errors, timeouts and closure in the result.

Built from Abla v0.2.79 source ba5d6b7d. Examples and generated signatures follow that source revision.