As per the new release of sails v0.11, the function onConnect is deprecated in config/sockets.js file. I couldn't implement the socket.on events or catch socket events from server side. Is there any way to implement ?
working by updating code in config/bootstrap.js
as @mikermcneil suggested:
module.exports.bootstrap = function(cb) {
sails.io.on('connect', function (socket){
socket.on('testE', function(data) {
socket.emit('testEvent',{p1:'hehe'});
});
});
cb();
};