MCPcopy Index your code
hub / github.com/deepnote/deepnote / createJsonWebSocketFactory

Function createJsonWebSocketFactory

packages/runtime-core/src/kernel-client.ts:30–41  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

28 * via the documented WebSocket option.
29 */
30export function createJsonWebSocketFactory(): typeof WebSocket {
31 return class extends WebSocket {
32 constructor(url: string | URL, protocols?: string | string[]) {
33 const filtered = Array.isArray(protocols)
34 ? protocols.filter(p => p !== JUPYTER_BINARY_PROTOCOL)
35 : protocols === JUPYTER_BINARY_PROTOCOL
36 ? undefined
37 : protocols
38 super(url, filtered)
39 }
40 } as typeof WebSocket
41}
42
43/**
44 * Client for communicating with a Jupyter kernel via the Jupyter protocol.

Callers 1

connectMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected