I'm using Socket.io 1.0 on my project and I would like to bind any event on the server, something like:
socket.on('*')
so I can do that on my client:
socket.emit('forum.post')
And the server would call the function "post" of the object "Forum". That would be to have a better organization in my project. With some methods I found on the web, I would do that to override socket.io function:
var onevent = socket.onevent;
socket.onevent = function() {
console.log('***','on',Array.prototype.slice.call(arguments));
onevent.apply(socket, arguments);
};
but the socket.on('*') is never called.