serverUrl

fun serverUrl(serverUrl: String): WebSocketNetworkTransport.Builder


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

Configure the server URL dynamically.

Parameters

serverUrl

a function returning the new server URL. This function will be called every time a WebSocket is opened. For example, you can use it to update your auth credentials in case of an unauthorized error.

It is a suspending function, so it can be used to introduce delay before setting the new serverUrl.