PhoenixNetworkTransport

class PhoenixNetworkTransport : NetworkTransport

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

Link copied to clipboard
class Builder

Functions

Link copied to clipboard
open override fun dispose()
Link copied to clipboard
open override fun <D : Operation.Data> execute(request: ApolloRequest<D>): Flow<ApolloResponse<D>>
Link copied to clipboard
suspend fun reconnect(scope: CoroutineScope, queueMessages: Boolean = true)

Reconnects the PhxSocket with parameters specified by the reconnectWith lambda.