Replies: 1 comment 4 replies
-
I'm confused by your terminology. The JSON object you share is not a response. It is a notification. Responses do not include method names.
I don't understand this either, because in fact RPC server methods can call
Another option is to declare a method on a class, and pass an instance of that class is a local target object. That will let the remote party invoke public methods on your locally defined class. Since the method name on this notification isn't a valid C# method name, you can apply the |
Beta Was this translation helpful? Give feedback.
-
Good afternoon!
I am using your package for implementing a json rpc client which connects to a json rpc server (json rpc server is provided by an external client). I am using your package for connecting to the server an executing the methods it provides. So far so good it works like a charm for simple calls.
However, the server has a special functionality where he sends a response when an event is raised inside him. I cannot subscribe to this response and I neither can use
NotifyAsync
method since this method is not a valid method to call in my server methods. This response looks like this:For managing this special use case I am using a method provided by your package like follows:
jsonRpc.AddLocalRpcMethod("Event.eventOccurred", "Here I will have an async delegate");
As I understand this
AddLocalRpcMethod
will create a local method to execute when called. I do not know if maybe I am missunderstanding the method or maybe my implementation is not correct but this method seems to never be called which means my async delegate is not executed and my flow cannot continue.AddLocalRpcMethod
for my use case?Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions