Home Help Center

Do I need an extra Ice-Server for callbacks?

HpGislerHpGisler Member Hanspeter GislerOrganization: SensirionProject: Rigi
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... :(

Thanks very much for any clarification.
Hanspeter

Comments

  • bernardbernard Jupiter, FLAdministrators, ZeroC Staff Bernard NormierOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    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,
    Bernard
Sign In or Register to comment.