safesocket

Wraps socket.io event handlers to prevent crashes from certain malicious inputs.

safesocket

Wraps socket.io event handlers to prevent crashes from certain malicious inputs.

var safesocket = require('safesocket');

socket.on('ping', safesocket(function (args, callback) {
    console.log('Pinged from ' + args.name);
    callback('pong');
}));

The MIT License (MIT)