broadcast<T extends DataObject, V extends DataResolver<T> > method
- @mustCallSuper
- T data, {
- Connection? exclude,
Broadcasts data
to all connections.
If exclude
is provided, the data
will not be sent to that connection.
Implementation
@mustCallSuper
void broadcast<T extends DataObject, V extends DataResolver<T>>(
T data, {
Connection? exclude,
}) {
for (final connection in connections) {
if (connection == exclude) continue;
send<T, V>(data, connection);
}
}