MCPcopy Create free account
hub / github.com/Marus/cortex-debug / EmitAllocated

Method EmitAllocated

src/tcpportscanner.ts:40–47  ·  view source on GitHub ↗
(ports: number[])

Source from the content-addressed store, hash-verified

38 public static AvoidPorts: Set<number> = new Set<number>();
39
40 public static EmitAllocated(ports: number[]) {
41 if (ports && ports.length) {
42 for (const p of ports) {
43 TcpPortScanner.AvoidPorts.add(p);
44 }
45 TcpPortScanner.PortAllocated.emit('allocated', ports);
46 }
47 }
48
49 /**
50 * Checks to see if the port is in use by creating a server on that port. You should use the function

Callers 2

getAnyFreePortFunction · 0.80
doResolveMethod · 0.80

Calls 1

addMethod · 0.45

Tested by

no test coverage detected