libjson-rpc-cpp
libjson-rpc-cpp copied to clipboard
is it possible to use two or more .h stubs for one single HTTP server?
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
HttpServerobject for several different stubAbstractServerchild object constructors - Creating a child class inheriting all
AbstractServerclasses 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!
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?