broadcast

inline suspend fun <T : Any> RealtimeChannel.broadcast(event: String, message: T)(source)

Sends a message to everyone who joined the channel. Can be used even if you aren't connected to the channel.

Parameters

event

the broadcast event. Example: mouse_cursor

message

the message to send as T (can only be something that can be encoded as a json object)