I'm trying to parse frames from Websockets. I did it with Fiddler, which shows me binary data from the frame. I need the same result but I need to get it via Javascript or Php (or any other language). I tried to do that with Js
var a = new WebSocket("ws://example.com");
a.onopen = function()
{
console.log("open");
a.send("test");
var b = new Uint8Array([8,6,7,5,3,0,9]);
a.send(b.buffer); };
a.onmessage = function(e) { console.log(e.data.toString());};
a.onclose = function() { console.log("closed");};
But I didn't receive any data on "a.onmessage". At this moment I've stucked. To clarify my question one more time. I need simple code example which parses frames from websockets. Example of what I'm trying to parse
Thanks!