Builder

class Builder

Constructors

Link copied to clipboard
fun Builder()

Functions

Link copied to clipboard
fun addHeader(name: String, value: String): WebSocketNetworkTransport.Builder
Link copied to clipboard
fun addHeaders(headers: List<HttpHeader>): WebSocketNetworkTransport.Builder
Link copied to clipboard
fun build(): WebSocketNetworkTransport
Link copied to clipboard
fun headers(headers: List<HttpHeader>): WebSocketNetworkTransport.Builder
Link copied to clipboard
fun idleTimeoutMillis(idleTimeoutMillis: Long): WebSocketNetworkTransport.Builder
Link copied to clipboard
fun protocol(protocolFactory: WsProtocol.Factory): WebSocketNetworkTransport.Builder
Link copied to clipboard
Link copied to clipboard
fun reopenWhen(reopenWhen: suspend (Throwable, attempt: Long) -> Boolean?): WebSocketNetworkTransport.Builder

Configure the WebSocketNetworkTransport to reopen the websocket automatically when a network error happens

Link copied to clipboard
fun serverUrl(serverUrl: String): WebSocketNetworkTransport.Builder

fun serverUrl(serverUrl: suspend () -> String?): WebSocketNetworkTransport.Builder

Configure the server URL dynamically.

Link copied to clipboard
fun webSocketEngine(webSocketEngine: WebSocketEngine): WebSocketNetworkTransport.Builder

Extensions

Link copied to clipboard
fun WebSocketNetworkTransport.Builder.okHttpClient(okHttpClient: OkHttpClient): WebSocketNetworkTransport.Builder

Configures the WebSocketNetworkTransport to use the okHttpCallFactory for network requests.