title: npm 'websocket' server send message to client
body: <p>In the code that I inherited is used <a href="https://www.npmjs.com/package/websocket" rel="nofollow noreferrer">this</a> websocket. I read the documentation and did a lot of google search to find how websocketServer can emit message to the client(browser). Here is a code snippet:</p>
  
  <pre><code>    var wsServer = new WebSocketServer({
          httpServer: server,
          autoAcceptConnections: false,
          path:"/async" //This attribute is not in the documentation
      });
  
    wsServer.on('request', function(request) {
      var connection = request.accept('relay_protocol', request.origin);
      connection.on('message', function(message) {
         ....
         });
       });
  </code></pre>
  
  <p>I wasnt able to find documentation for <code>connection</code> object. What propety does it have?</p>
  
  <p>And last, what method to use to send message back to the client?</p>
  
  <p>In general the information given for this module is very poor. Please help.</p>