This forum has been archived. Please start a new discussion on GitHub.

Client side invocations from a Server app.

This is a newbie post so please be gentle...

I'm new to ICE and I'm trying to understand how I can achieve the following:

Say I have a socket connection which by definition is full duplex. One side is a server and the other side is a client. I can send messages in either direction over this socket and the server and client can respond appropriately to the messages that are exchanged.

From my limited understanding (if this is wrong please forgive me) of ICE it appears that server always responds to invocations from the client and return result sets back as either out parameters or the return value of the invocations.

I have a situation where the Server has to invoke an operation on one or more of its connected clients. How do I do this? Does the client have to create an entity(a client side server) that is exposed as a proxy to the Server that needs to make the invocations? I hope not seeing as we already have a full duplex connection that exists under the covers.

Could you please point me to resources that can help clear up the confusion I'm having.

Thanks, Vince


  • benoit
    benoit Rennes, France
    Hi Vince,

    Yes, the client has to create an object adapter, register a servant with it and pass a proxy for this servant to your server. When calling on this proxy the server will generally establish a new connection.

    If you want to re-use the existing connection between the client and server, you should use bidirectional connections instead. See the demo/Ice/bidir demo from your Ice distribution for an example on how to use bidirectional connections. See also this section in the Ice manual for more information on bidirectional connections.

  • Benoit,

    Thanks for the fast reply. Much appreciated. I will look at the sample and absorb the section of the manual that you pointed out. Thanks again.

    -- Vince
  • Fantastic! That's exactly what I was looking for.

    -- Vince