libjson-rpc-cpp icon indicating copy to clipboard operation
libjson-rpc-cpp copied to clipboard

is it possible to use two or more .h stubs for one single HTTP server?

Open arthurep opened this issue 3 years ago • 1 comments

I have a collection of several JSON-RPC .json files which I would like to support in a single HTTP server. I have tried:

  • Reutilizing the same HttpServer object for several different stub AbstractServer child object constructors
  • Creating a child class inheriting all AbstractServer classes from my stubs which implement all their methods

For both cases, it seems that only the last AbstractServer stub, which I include my HttpServer object in, is taken into account. Calling methods from other stubs returns a METHOD_NOT_FOUND to the calling client.

Therefore I wanted to ask: is using several json-rpc stubs for a single httpServer (or any other AbstractServerConnector) a supported usecase of this library? If yes, any suggestions on how to implement it?

Thanks a lot!

arthurep avatar Mar 21 '22 17:03 arthurep

Hi! This is currently not possible. How would you expect this to work? Use the first server implementation that has a matching method name? Or use different url prefixes per server?

cinemast avatar Mar 27 '24 13:03 cinemast