MCPcopy Index your code
hub / github.com/socketio/socket.io / run

Method run

lib/index.ts:313–331  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

311 const keysIterator = this.parentNsps.keys();
312
313 const run = () => {
314 const nextFn = keysIterator.next();
315 if (nextFn.done) {
316 return fn(false);
317 }
318 nextFn.value(name, auth, (err, allow) => {
319 if (err || !allow) {
320 return run();
321 }
322 if (this._nsps.has(name)) {
323 // the namespace was created in the meantime
324 debug("dynamic namespace %s already exists", name);
325 return fn(this._nsps.get(name) as Namespace);
326 }
327 const namespace = this.parentNsps.get(nextFn.value)!.createChild(name);
328 debug("dynamic namespace %s was created", name);
329 fn(namespace);
330 });
331 };
332
333 run();
334 }

Callers

nothing calls this directly

Calls 2

fnFunction · 0.85
createChildMethod · 0.80

Tested by

no test coverage detected