Skip to content

How can I call client functions from server? #3943

Answered by pepone
kamyar1979 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi Kamyar,

With IceRPC we prefer the term "server-to-client" or "the other way around" to refer to RPCs initiated by the server, instead of using "bidirectional", with that out of the way let me explain how this works with IceRPC.

With IceRPC you send a request by using an invoker, and you process a request and return the corresponding response by using a dispatcher.

On the client side, you typically use the ClientConnection or ConnectionCache invokers for sending requests to a server, and that is what most examples show:

await using var connection = new ClientConnection(new Uri("icerpc://localhost"));
// GreeterProxy is a struct generated by the Slice compiler.
var greeterProxy = new Gre…

Replies: 0 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by bernardnormier
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants