Archived
This forum has been archived. Please start a new discussion on GitHub.
Do I need an extra Ice-Server for callbacks?
Hello
Situation:
We've got a client running on a PC (C#) and a server running on a embedded PC (C++).
Normally, the client only needs functionality from the server (this is done of course via ice).
However, some server methods need to callback some methods on the client side (e.g. for logging).
I've checked the callback-example in the distribution but didn't quite understand it.
Question:
Is it in any case necessary, that the client side sets up an extra ice-server session (in a separate thread) to serve the servers callback-request?
Or is the ice-runtime on the client-side capable - while waiting for the method call to return - to handle (serve) incoming callback-requests?
I've tried this for our application but only did earn an ice-exception...![:( :(](https://forums.zeroc.com/resources/emoji/frowning.png)
Thanks very much for any clarification.
Hanspeter
Situation:
We've got a client running on a PC (C#) and a server running on a embedded PC (C++).
Normally, the client only needs functionality from the server (this is done of course via ice).
However, some server methods need to callback some methods on the client side (e.g. for logging).
I've checked the callback-example in the distribution but didn't quite understand it.
Question:
Is it in any case necessary, that the client side sets up an extra ice-server session (in a separate thread) to serve the servers callback-request?
Or is the ice-runtime on the client-side capable - while waiting for the method call to return - to handle (serve) incoming callback-requests?
I've tried this for our application but only did earn an ice-exception...
![:( :(](https://forums.zeroc.com/resources/emoji/frowning.png)
Thanks very much for any clarification.
Hanspeter
0
Comments
-
Hi Hanspeter,
To receive callbacks, your client needs to implement the Callback objects: you create Callback servants in your client, add them to an object adapter (in your client) and activate this object adapter.
In effect, your client becomes a server.
The threads used to dispatch requests on the Callbacks come from the Ice server thread pool in your client program, or from your object adapter thread pool (if you've configured a thread pool on your object adapter).
Cheers,
Bernard0