api

http4k / org.http4k.client / WebsocketClient / nonBlocking

nonBlocking

fun nonBlocking(uri: Uri, headers: Headers = emptyList(), timeout: Duration = ZERO, onError: (Throwable) -> Unit = {}, draft: Draft = Draft_6455(), onConnect: WsConsumer = {}): Websocket

Provides a client-side Websocket instance connected to a remote Websocket. The resultant object can be have listeners attached to it. Optionally pass a WsConsumer which will be called onConnect