<commit_before>/*
 * Serve content over a socket
 */

module.exports = function (socket) {
    var gameId;
    socket.on('joinGame', function(data){
        gameId = data.gameId;
        socket.join(gameId);
    });
 
    socket.on('control', function (data){
        io.sockets.sockets(openGames.).emit('message', 'for your eyes only');
        socket.volatile.broadcast.to(gameId).emit('event_name', data)
        socket. 
        console.log('mario event!');
        console.log(data);
        socket.volatile.broadcast.emit('mario', data);
    });

    socket.on('disconnect', function() {
        delete availableSockets[socket.id];
    });
};<commit_msg>multi rooms ready?<commit_after>/*
 * Serve content over a socket
 */

module.exports = function (socket) {
    var gameId;
    socket.on('joinGame', function(data){
        gameId = data.gameId;
        socket.join(gameId);
    });
 
    socket.on('control', function (data){
        socket.broadcast.to(gameId).emit('control', data);
    });

};
{'fraction_non_alphanumeric': 0.1618669314796425, 'fraction_numerical': 0.0, 'mean_word_length': 2.789473684210526, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5911912', 'n_tokens_mistral': 318, 'n_tokens_neox': 307, 'n_words': 59}