MCPcopy Create free account
hub / github.com/SagerNet/sing-box-dashboard / constructor

Method constructor

src/api/stream.ts:57–63  ·  view source on GitHub ↗
(
    private createInitial: () => T,
    private runStream: (context: StreamContext<T>) => Promise<void>,
    private resetOnReconnect = false,
  )

Source from the content-addressed store, hash-verified

55 if (this.listeners.size === 1) {
56 this.start();
57 }
58 return () => {
59 this.listeners.delete(listener);
60 if (this.listeners.size === 0) {
61 this.stop();
62 }
63 };
64 };
65
66 getSnapshot = (): StreamSnapshot<T> => this.snapshot;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected