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

Method wsWait

test/utils/httpserver.ts:91–97  ·  view source on GitHub ↗

* Open a websocket and wait for it to fully open.

(requestPath: string, options?: Websocket.ClientOptions)

Source from the content-addressed store, hash-verified

89 * Open a websocket and wait for it to fully open.
90 */
91 public wsWait(requestPath: string, options?: Websocket.ClientOptions): Promise<Websocket> {
92 const ws = this.ws(requestPath, options)
93 return new Promise<Websocket>((resolve, reject) => {
94 ws.on("error", (err) => reject(err))
95 ws.on("open", () => resolve(ws))
96 })
97 }
98
99 public port(): number {
100 const addr = this.hs.address()

Callers 2

proxy.test.tsFile · 0.80
vscode.test.tsFile · 0.80

Calls 2

wsMethod · 0.95
resolveFunction · 0.85

Tested by

no test coverage detected