title: Web socket connection can't be established
body: <p>I am able to establish connection between browser and server lately.. But for the past two days the connection is not getting established.. I am unable to figure out what could have gone wrong? </p>
  
  <pre><code>&lt;head&gt;
  &lt;script type="text/javascript"&gt;
  function WebSocketTest()
  {
   if ("WebSocket" in window)
   {
     var x=document.getElementById('chat').value;
     // Let us open a web socket
     var ws = new WebSocket("ws://localhost:7869/echo");
     ws.onopen = function()
     {
      // Web Socket is connected, send data using send()
      ws.send(x);
      var send=document.getElementById('fill');
      send.innerHTML = send.innerHTML+'&lt;br&gt;'+ x;
     };
     ws.onmessage = function (evt) 
     { 
      var received_msg = evt.data;
      var send=document.getElementById('fill');
      send.innerHTML = send.innerHTML +'&lt;br&gt;'+ received_msg;
     };
     ws.onclose = function()
     { 
      // websocket is closed.
      alert("Connection is closed..."); 
     };
    }
    else
    {
      // The browser doesn't support WebSocket
     alert("WebSocket NOT supported by your Browser!");
    }
  }
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;div id="sse"&gt;
   &lt;input type="text" id="chat"&gt;&lt;/div&gt;&lt;br&gt;
   &lt;button type='submit' onclick='javascript:WebSocketTest()'&gt;Send&lt;/button&gt;
  &lt;div id='fill'&gt;hi&lt;/div&gt;
  
  &lt;/body&gt;
  </code></pre>
  
  <p>Here is the code and websocket server is listening the 7869 port.</p>