userLeft method

void userLeft(
  1. UserLeftData data
)

Implementation

void userLeft(UserLeftData data) {
  final connection = getConnection(data.userId!);
  if (connection != null) {
    this.emit('user-left', null, connection);
    connection.close();
    connections!
        .removeWhere((element) => element!.userId! == connection.userId);
  }
}