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

Method ws

test/utils/httpserver.ts:78–86  ·  view source on GitHub ↗

* Open a websocket against the request path.

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

Source from the content-addressed store, hash-verified

76 * Open a websocket against the request path.
77 */
78 public ws(requestPath: string, options?: Websocket.ClientOptions): Websocket {
79 const address = ensureAddress(this.hs, "ws")
80 if (typeof address === "string") {
81 throw new Error("Cannot open websocket to socket path")
82 }
83 address.pathname = requestPath
84
85 return new Websocket(address.toString(), options)
86 }
87
88 /**
89 * Open a websocket and wait for it to fully open.

Callers 3

wsWaitMethod · 0.95
proxy.test.tsFile · 0.45
health.test.tsFile · 0.45

Calls 1

ensureAddressFunction · 0.90

Tested by

no test coverage detected