Is it possible to use WebSocket clients in workers?

Is it possible to use new WebSocket(url) and connect to an external websocket server with a worker?
Was this page helpful?