title: WebSocket error using nodejs
body: <p>I'm getting error in client server connection using WebSocket nodejs<br>
  I'm using <strong>node-websocket-server</strong> <a href="https://github.com/miksago/node-websocket-server" rel="nofollow">https://github.com/miksago/node-websocket-server</a><br>
  Error :<br>
  <em>WebSocket connection to 'ws://127.0.0.1:8000/' failed: Error during WebSocket handshake: 'Sec-WebSocket-Accept' header is missing *</em></p>
  
  <p><strong>Server code (server.js)</strong>:</p>
  
  <pre><code>var ws = require(__dirname + '/lib/ws/server');
  
  var server = ws.createServer();
  
  server.addListener("connection", function (conn) {
  
  console.log("A connection established with connection id "+ conn.id);
  
  var msg = "Welcome " + conn.id + " joining the party." +
      "Total connection : " + server.manager.length;
  
  server.broadcast(msg);
  
  });
  
  server.listen(8000);
  
  console.log("Websocket server is running...");
  
  console.log("Listening to port 8000");
  </code></pre>
  
  <p><strong>Client code</strong> :</p>
  
  <pre><code>var websock = {};
  
  $(function(){
  
      if(window["WebSocket"]){
  
      websock.socket = new WebSocket("ws://127.0.0.1:8000");
  
      websock.socket.onopen = function(e){
          console.log("WebSocket connection established");
      };
  
      websock.socket.onmessage = function(e){
          console.log(e.data);
      };
  
      websock.socket.onclose = function(e){
          console.log("WebSocket connection closed.");
      };
  
      }
     });
  </code></pre>
  
  <p><strong>index.html</strong> :  </p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;title&gt;WebSockets&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  
  &lt;script src="js/jquery-2.1.0.min.js"&gt;&lt;/script&gt;
  &lt;script src="js/client.websocket.js"&gt;&lt;/script&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>I dont know what's the problem here.Thanks in advance.</p>