MCPcopy Index your code
hub / github.com/coder/code-server / findFreeSocketPath

Method findFreeSocketPath

src/node/socket.ts:98–105  ·  view source on GitHub ↗
(basePath: string, maxTries = 100)

Source from the content-addressed store, hash-verified

96 }
97
98 public async findFreeSocketPath(basePath: string, maxTries = 100): Promise<string> {
99 let i = 0
100 let path = basePath
101 while ((await canConnect(path)) && i < maxTries) {
102 path = `${basePath}-${++i}`
103 }
104 return path
105 }
106}

Callers 2

startProxyServerMethod · 0.95
socket.test.tsFile · 0.80

Calls 1

canConnectFunction · 0.90

Tested by

no test coverage detected