// Generated by CoffeeScript 1.9.2
var WebSocketServer, wss;

WebSocketServer = require('ws').Server;

wss = new WebSocketServer({
  port: 8080
});

wss.on('connection', function(ws) {
  var handle;
  ws.on('message', function(message) {
    return console.log(message);
  });
  handle = setInterval(function() {
    return ws.send('something');
  }, 1000);
  return ws.on('close', function() {
    return clearInterval(handle);
  });
});
