Package-level declarations

Types

Link copied to clipboard
Link copied to clipboard
interface Websocket

Represents a connected Websocket instance, and can be passed around an application. This is configured to react to events on the WS event stream by attaching listeners.

Link copied to clipboard
Link copied to clipboard
interface WsClient
Link copied to clipboard
typealias WsConsumer = (Websocket) -> Unit
Link copied to clipboard
Link copied to clipboard
typealias WsHandler = (Request) -> WsResponse
Link copied to clipboard
data class WsMessage(val body: Body, val mode: WsMessage.Mode)
Link copied to clipboard
data class WsResponse(val subprotocol: String? = null, val consumer: WsConsumer) : Function1<Websocket, Unit>
Link copied to clipboard
data class WsStatus(val code: Int, val description: String)

Properties

Link copied to clipboard

Functions

Link copied to clipboard
fun WebsocketFactory.blocking(uri: String, headers: Headers = emptyList()): WsClient
Link copied to clipboard
fun WebsocketFactory.nonBlocking(uri: String, headers: Headers = emptyList(), onError: (Throwable) -> Unit = {}, onConnect: WsConsumer = {}): Websocket
Link copied to clipboard