Datalayer VS Code Extension - v0.0.6
    Preparing search index...

    Handles network communications between webview and Jupyter servers. Manages WebSocket connections and HTTP request proxying for notebook operations. For local ZMQ kernels, uses LocalKernelProxy instead of real WebSockets.

    const networkService = new NotebookNetworkService(kernelBridge);
    networkService.forwardRequest(message, webview);
    Index

    Constructors

    Properties

    _connectionToKernel: Map<string, string> = ...
    _kernelBridge?: IKernelBridge
    _localKernelProxies: Map<string, LocalKernelProxy> = ...
    _websockets: Map<string, WebSocket> = ...

    Methods

    • Cleans up all WebSocket connections and local kernel proxies. Closes all active connections and clears the connection maps.

      Returns void

    • Forwards HTTP requests from webview to target server. For local kernels, intercepts and handles REST API calls. Handles method, headers, and body forwarding with response relay.

      Parameters

      • message: ExtensionMessage

        Extension message containing request details

      • webview: WebviewPanel

        Target webview panel for response

      Returns void

    • Opens a WebSocket connection for Jupyter kernel communication. For local kernels, creates a LocalKernelProxy instead. Sets up event handlers for open, message, close, and error events.

      Parameters

      • message: ExtensionMessage

        Extension message with WebSocket configuration

      • webview: WebviewPanel

        Target webview panel for event notifications

      Returns void

    • Posts a message to the webview.

      Parameters

      • panel: WebviewPanel

        Target webview panel

      • type: string

        Message type identifier

      • body: unknown

        Message payload

      • OptionalrequestIdOrId: string

        Optional message ID for correlation (requestId for HTTP, id for WebSocket)

      Returns void