Builder

class Builder

Functions

Link copied to clipboard
fun build(): PhoenixNetworkTransport
Link copied to clipboard
fun channelJoinTimeoutMs(channelJoinTimeoutMs: Long): PhoenixNetworkTransport.Builder

Set the channel join timeout

Link copied to clipboard
fun idleTimeoutMillis(idleTimeoutMillis: Long): PhoenixNetworkTransport.Builder

Set the idle timeout

Link copied to clipboard
fun logger(logger: (log: Any) -> Unit?): PhoenixNetworkTransport.Builder
Link copied to clipboard
fun params(params: Payload): PhoenixNetworkTransport.Builder

Set the socket parameters

Link copied to clipboard
fun reconnectWhen(queueMessages: Boolean = true, reconnectWhen: (Throwable) -> Boolean?): PhoenixNetworkTransport.Builder

Configure the PhoenixNetworkTransport to reconnect the socket automatically when a network error happens.

Link copied to clipboard
fun reconnectWith(reconnectWith: () -> Payload??): PhoenixNetworkTransport.Builder

Configure the reconnectWhen lambda to apply the returned params to the next socket reconnection. Can be useful in order to reconnect to the server with authorization headers applied

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

Set the server url

Link copied to clipboard
fun topic(topic: String): PhoenixNetworkTransport.Builder

Set the channel topic