Channel

class Channel(topic: String, params: Payload, socket: Socket, socketFlow: SocketFlow, scope: CoroutineScope) : SharedFlow<Message>

Represents a Channel bound to a given topic

Constructors

Link copied to clipboard
fun Channel(topic: String, params: Payload, socket: Socket, socketFlow: SocketFlow, scope: CoroutineScope)

Types

Link copied to clipboard
enum Event : Enum<Channel.Event>

Channel specific events

Link copied to clipboard
enum State : Enum<Channel.State>

States of a Channel

Functions

Link copied to clipboard
open suspend override fun collect(collector: FlowCollector<Message>): Nothing
Link copied to clipboard
suspend fun join(timeout: Long = this.timeout): Push

Tries to join the Phoenix channel with the specified timeout.

Link copied to clipboard
suspend fun leave(timeout: Long = this.timeout): Push

Tries to leave the Channel with the specified timeout.

Link copied to clipboard
suspend fun push(event: String, payload: Payload, timeout: Long = this.timeout): Push

Tries to send the specified event and payload to bound Channel if it has already been joined.

Properties

Link copied to clipboard
val isClosed: Boolean
Link copied to clipboard
val isErrored: Boolean
Link copied to clipboard
val isJoined: Boolean
Link copied to clipboard
val isJoining: Boolean
Link copied to clipboard
val isLeaving: Boolean
Link copied to clipboard
val joinRef: String?

The ref sent during the joinPush.

Link copied to clipboard
var params: Payload

Params passed in through constructions and provided to the joinPush

Link copied to clipboard
open override val replayCache: List<Message>
Link copied to clipboard
val topic: String