简体   繁体   中英

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?

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM