Skip to content

[Feedback wanted] Move method call events under single event: 'methodCall' #57

Description

@baalexander

This came out of the discussion from Pull Request #56.

There was a need to be able to respond to a listening and close event from the XML-RPC server. However, server.on('listening') could cause a conflict if the XML-RPC method call's name was listening. One proposed solution is to change the API to something like:

server.on('methodCall', function(method, args) {
  // switch based on method name
});
server.on('listening', function() {
})
server.on('close', function() {
});
server.on('error', function(error) {
});

The disadvantage is a big API change. The advantage is other events can be emitted (listening, close, etc.) and not be confused with method names.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions