Establish a web socket connection

suggest change

new WebSocket starts the connection and returns immediately. Listen for open, message, and error. Use wss:// on an HTTPS page. ws:// is unencrypted.

const wsHost = "wss://my-sites-url.com/path/to/web-socket-handler";
const ws = new WebSocket(wsHost);

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents