I see "Unsupported protocol: "null" on server side
No response received.
Same test work fine with tornado.
If I try using my local javascript, it works fine.
function WebSocketTest()
{
if ("WebSocket" in window)
{
alert("WebSocket is supported by your Browser!");
// Let us open a web socket
var ws = new WebSocket("ws://ipaddress:8080/", 'echo');
ws.onopen = function()
{
// Web Socket is connected, send data using send()
ws.send('{"id":"dsfsdf", "body":"Rock it with HTML5 WebSocket"}');
alert("Message is sent...");
};
ws.onmessage = function (evt)
{
var received_msg = evt.data;
alert("Message is received..." );
alert("received:" + received_msg)
};
ws.onclose = function()
{
// websocket is closed.
alert("Connection is closed...");
};
ws.onerror = function(evt)
{
// Web Socket error
var msg_error = evt.error;
alert("error:");
alert(msg_error);
};
}
else
{
// The browser doesn't support WebSocket
alert("WebSocket NOT supported by your Browser!");
}
}
Hi @lipp, When I use http://www.websocket.org/echo.html to test the ws:// request,
If I try using my local javascript, it works fine.
function WebSocketTest() { if ("WebSocket" in window) { alert("WebSocket is supported by your Browser!"); // Let us open a web socket var ws = new WebSocket("ws://ipaddress:8080/", 'echo');
} else { // The browser doesn't support WebSocket alert("WebSocket NOT supported by your Browser!"); } }