const program = require('commander');

program
    .version('0.0.1')
    .option('-p, --port <port>', 'specify the websocket port to listen to [3031]', 3031)
    .parse(process.argv);


const io = require('socket.io'),
      winston = require('winston');

winston.level = 'debug';
winston.remove(winston.transports.Console);
winston.add(winston.transports.Console, {'timestamp': true});

const PORT = program.port;

winston.info('Unichat realtime service');
winston.info('Listening on port ' + PORT);

const socket = io.listen(PORT);

@@ -523,12 +523,286 @@
 sten(PORT);%0A
+%0Asocket.on('connection', (client) =%3E %7B%0A    winston.debug('New connection from client ' + client.id);%0A%0A    client.on('client-hello', (data) =%3E %7B%0A        winston.debug('Client ' + client.id + ' sent client-hello.');%0A        client.emit('server-hello', client.id);%0A    %7D);%0A%7D);%0A

Add client-hello listener