PhoenixNetworkTransport
A NetworkTransport that works with Phoenix Channels.
Parameters
serverUrl
the url to use to establish the Phoenix Socket connection.
topic
the topic to which the channel will subscribe
params
the parameters to send to the server (e.g. authentication headers)
channelJoinTimeoutMs
the time during which the channel will try to join before timing out
idleTimeoutMillis
the idle time duration beyond which the socket will disconnect
reconnectWhen
a function taking the error as a parameter and returning 'true' to reconnect
Types
Functions
Link copied to clipboard
suspend fun reconnect(scope: CoroutineScope, queueMessages: Boolean = true)
Content copied to clipboard
Reconnects the PhxSocket with parameters specified by the reconnectWith lambda.