http4k / org.http4k.websocket / Websocket
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.
Name | Summary |
---|---|
upgradeRequest | abstract val upgradeRequest: Request |
Name | Summary |
---|---|
close | abstract fun close(status: WsStatus = NORMAL): Unit |
onClose | abstract fun onClose(fn: ( WsStatus ) -> Unit ): Unit |
onError | abstract fun onError(fn: ( Throwable ) -> Unit ): Unit |
onMessage | abstract fun onMessage(fn: ( WsMessage ) -> Unit ): Unit |
send | abstract fun send(message: WsMessage ): Unit |
Name | Summary |
---|---|
PushPullAdaptingWebSocket | abstract class PushPullAdaptingWebSocket : Websocket |