remove method

void remove(
  1. String id
)

Removes a client from the session by its ID.

The id parameter is the unique ID of the client to remove. Also removes the client from the user associations if applicable.

Implementation

void remove(String id) {
  _clients.remove(id);
  _users.removeWhere((userId, userClinets) {
    userClinets.remove(id);
    return userClinets.isEmpty;
  });
}