I have an app that needs to know what channels/topics the clients want to listen on without knowing in advance what these are. I applied this small change in transport.js, onMessage:
if ( this.manager.onAnyPacket ) {
this.manager.onAnyPacket( this, packet );
}
// handle packet locally or publish it
if (current) {
...
Then in my app, server side, I can do:
io.onAnyPacket(function(client, packet) {
...
});
It would be nice to have that sort of entry point. What do you think? Or is it already available in some other form which I'm not aware of?