Channel

class Channel(topic: String, params: Payload, socket: Socket)

Represents a Channel bound to a given topic

Constructors

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

Types

Event
Link copied to clipboard
enum Event : Enum<Channel.Event>
Channel specific events
State
Link copied to clipboard
enum State : Enum<Channel.State>
States of a Channel

Functions

join
Link copied to clipboard
fun join(timeout: Long = this.timeout): Push
leave
Link copied to clipboard
fun leave(timeout: Long = this.timeout): Push
off
Link copied to clipboard
fun off(event: String, ref: Int? = null)
on
Link copied to clipboard
fun on(event: String, callback: (Message) -> Unit): Int
fun on(event: Channel.Event, callback: (Message) -> Unit): Int
onClose
Link copied to clipboard
fun onClose(callback: (Message) -> Unit): Int
onError
Link copied to clipboard
fun onError(callback: (Message) -> Unit): Int
onMessage
Link copied to clipboard
fun onMessage(callback: (Message) -> Message)
push
Link copied to clipboard
fun push(event: String, payload: Payload, timeout: Long = this.timeout): Push

Properties

canPush
Link copied to clipboard
val canPush: Boolean
isClosed
Link copied to clipboard
val isClosed: Boolean
isErrored
Link copied to clipboard
val isErrored: Boolean
isJoined
Link copied to clipboard
val isJoined: Boolean
isJoining
Link copied to clipboard
val isJoining: Boolean
isLeaving
Link copied to clipboard
val isLeaving: Boolean
joinRef
Link copied to clipboard
val joinRef: String?
The ref sent during the join message.
params
Link copied to clipboard
var params: Payload
Params passed in through constructions and provided to the JoinPush
topic
Link copied to clipboard
val topic: String