title: NodeJS Websocket (ws) Callback
body: <p>I am using the "ws" NodeJS websocket library. Previously I was trying out socket.io; with socket.io I could implement callbacks between the client and server like this:</p>
  
  <pre><code>socket.emit('Data', data, function(data){
         console.log(data);
  });
  
  socket.on('Data', function(data, callback){
         callback('it worked');
  });
  </code></pre>
  
  <p>I have tried to do the same thing using the ws library, but have not had any success. Is it possible, and if so how?</p>