toRoom method

void toRoom(
  1. String room,
  2. dynamic message
)

Broadcasts a message to all connections currently in the specified room.

Implementation

void toRoom(String room, dynamic message) {
  for (final conn in _connections.values) {
    if (conn.isInRoom(room)) {
      conn.send(message);
    }
  }
}