This is an example of a web-socket client in javascript.
It:
Connects to a live demo server.
Sends a message.
Receives message(s).
Disconnects after an interval.
var mySocket = null;
var serverUrl = 'wss://echo.websocket.org'; // wss: is ws: but using SSL.
var oWebSocket = window...