This is a very simple WebSocket Client wrapper.
<scriptsrc="js/poorws.js"></script>varws=newpoorws("SERVER URL");ws.onStatusChange=function(status){$("#status").text(status);};$("#sendmes").click(function(){ws.send("testes");});ws.onMessage=function(mes){varstr=JSON.parse(mes.data);console.log(str);};That's all! Enjoy! :D