citykid
citykid

Reputation: 11142

How can I send data via Websocket from a VSCode extension

I would like to send data via Websocket from an VSCode extension. Is there a builtin websocket facility or should I import the package "ws" or else?

Upvotes: 2

Views: 4250

Answers (2)

Broken Pipe
Broken Pipe

Reputation: 3021

You can use the ws package, here is an example from the official samples repository: https://github.com/microsoft/vscode-extension-samples/blob/main/lsp-log-streaming-sample/client/src/extension.ts

Upvotes: 3

citykid
citykid

Reputation: 11142

used ws package, which sadly is not in ES6 module format but otherwise does its job.

Upvotes: 1

Related Questions