leave method

Socket leave(
  1. dynamic room,
  2. dynamic fn
)

Leaves a room.

@param {String} room @param {Function} optional, callback @return {Socket} self @api private

Implementation

Socket leave(room, fn) {
  adapter.del(id, room, ([err]) {
    if (err != null) return fn?.call(err);
    roomMap.remove(room);
    fn?.call(null);
  });
  return this;
}