uber-archive / multitransport-jsonrpc

JSON-RPC Client (Node.js & Browser) and Server (Node.js) aim at "natural looking" server and client code.
116 stars 22 forks source link

Exposes blocking() via server constructor #51

Open ssimeonov opened 10 years ago

ssimeonov commented 10 years ago

Per the README, blocking() should be exposed by the server constructor function and not the instance objects. This makes sense for two reasons:

  1. Developers should be able to define RPC methods prior to a server instance being created.
  2. The implementation has no dependencies on the server instance.
Raynos commented 10 years ago

Can we add it to both and leave a comment that the prototype version is deprecated.

Although @dfellis might want to chip in and say that we can just remove the prototype method.

dfellis commented 10 years ago

So we've never actually used the blocking method in any of our prod code, but this is a public repo so we should either deprecate it or publish 0.5.0 after this. I'd rather not do a bigger version bump for a one-liner that probably doesn't affect anyone else's code out there, so can we leave it in both and make a note in the readme that getting the blocking method off of an instantiated server is deprecated?