MCPcopy
hub / github.com/alibaba/lightproxy / getInstance

Method getInstance

src/main/boradcast-manager.ts:9–18  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

7 private mWebSocket: WebSocket.Server;
8
9 static async getInstance() {
10 if (!this.mInstance) {
11 this.mInstance = (async () => {
12 const port = await getPort();
13 const instance = new BoardcastManager(port);
14 return instance;
15 })();
16 }
17 return this.mInstance;
18 }
19
20 constructor(port: number) {
21 this.mPort = port;

Callers 3

spawnModuleFunction · 0.80
getBoradcastPortFunction · 0.80
initIPCFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected