broadcast

abstract suspend fun broadcast(text: String, filter: (StreamId) -> Boolean = { true })(source)

Send a text message to all clients connected on this stream.

Parameters

filter

An optional filter which, if specified, limits the set of clients who will receive the message. The filter should return true to indicate that the client with the target ID should receive the message.