Skip to content

catch-all and missing event handler on client/server #5

Open
@siddo420

Description

@siddo420
  • Is it possible to define a catch-all event handler like '*' etc on client and server? This might be needed to send a response in case of missing event handlers.
  • Also, what happens if event handler does not exist? In my tests, nothing happens (no event handlers get called). Does it mean no memory is allocated/wasted etc in case of a huge number of such events?
  • On a slightly different topic, I am thinking of emitting events such that their response handlers could also be defined at the time of event emittance. For example,
primus.send({ emit: [...] }, timeout, success_cb, error_cb );

The .send method will do the heavy lifting of calling .write() and making sure timeout is not hit (error_cb will be called in that case). We need to make sure server side also deals with events appropriately and responds.

Has it been implemented already? Any tips on the most efficient way this could be achieved?

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