Skip to content

Add an ability to listen for any message coming in #1075

@radekg

Description

@radekg

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions