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

Method ws

src/node/wsRouter.ts:50–61  ·  view source on GitHub ↗

* Handle a websocket at this route. Note that websockets are immediately * paused when they come in. * * If the origin header exists it must match the host or the connection will * be prevented.

(route: expressCore.PathParams, ...handlers: WebSocketHandler[])

Source from the content-addressed store, hash-verified

48 * be prevented.
49 */
50 public ws(route: expressCore.PathParams, ...handlers: WebSocketHandler[]): void {
51 this.router.get(
52 route,
53 ...handlers.map((handler) => {
54 const wrapped: express.Handler = (req, res, next) => {
55 ;(req as InternalWebsocketRequest)._ws_handled = true
56 return handler(req as WebsocketRequest, res, next)
57 }
58 return wrapped
59 }),
60 )
61 }
62}
63
64export function Router(): WebsocketRouter {

Callers 4

health.tsFile · 0.45
domainProxy.tsFile · 0.45
vscode.tsFile · 0.45
wsProxyFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected