join method

Socket join(
  1. dynamic room, [
  2. dynamic fn
])

Joins a room.

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

Implementation

Socket join(room, [fn]) {
  if (roomMap.containsKey(room)) {
    if (fn != null) fn(null);
    return this;
  }
  adapter.add(id, room, ([err]) {
    if (err != null) return fn?.call(err);
//      _logger.info('joined room %s', room);
    roomMap[room] = room;
    if (fn != null) fn(null);
  });
  return this;
}