broadcastFlow
Broadcasts can be messages sent by other clients within the same channel under a specific event.
Example:
val messageFlow = channel.broadcastFlow<Message>("message")
messageFlow.collect {
println("Received message: $it")
}
Content copied to clipboard
Parameters
event
When a message is sent by another client, it will be sent under a specific event. This is the event that you want to listen to