nonBlocking

abstract fun nonBlocking(uri: Uri, headers: Headers = emptyList(), onError: (Throwable) -> Unit = {}, 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