getSockets(index) {
    // Addressable sockets affect only one connection at time
    if (this.isAddressable()) {
      if (index === null) {
        throw new Error(`${this.getId()} Socket ID required`);
      }
      const idx = /** @type {number} */ (index);
      if (!this.sockets[idx]) {
        return [];
      }
      return [this.sockets[idx]];
    }
    // Regular sockets affect all outbound connections
    return this.sockets;
  }
@param {number|null} index
@returns {Array<import("./InternalSocket").InternalSocket|void>}