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

Questions about the Demos: Bidir and Callback


I would like to ask if there are other examples like Bidir and Callback.
The reason is, please correct me if I'm wrong:

Bidir and Callback are examples which require that the client makes the first invocation at the server side. Thereby the client submits his proxy. Therefore the server is able to use it to invoke methods at the client side.

But how is it if the server has to invoke a method before the client has submitted his proxy?

My planed application requires one main server/client which is able to maintain several others like one master many slaves:

Main Master Slaves
Server/Client Clients/Servers

Server <-> Client1
Client <-> Server1

<-> Client2
<-> Server2

<-> Client3
<-> Server3

Depending on the situation the server will call the client or visa versa.
like I showed on:

Please let me know about your recommendations.

Thanks a lot
Greetings surfer


  • I'm not sure if I understand the question correctly. In any case, in order to invoke a method (callback or not) you need a proxy.

    If you use bi-directional connections, then the client must first initiate a connection to the server, send the identity of the client's Ice object to the server, so that the server can then create a proxy used for callbacks to the client. There is no other way, this is simply the nature of bi-directional connections.

    If you do not use bi-directional connections, then you can use whatever method you like to provide a callback proxy to the server, including passing a proxy as an argument in a method invocation from the client to the server, using a configuration file, sending the proxy to the server by email :), etc.
  • Have a look at this FAQ:

    Network tracing, as described in the FAQ, should help you to find the problem.
  • Proxy array ?


    thanks for your help !!
    That means that the client has to establish first a connection like you mentioned. But then the server is able to connect the client so much as he wants. That means for me I have to look that each client has to make min. one connection to the server if they start. After that the server stores the proxy in an array. Thereby the server is able to connect each client when ever he wants.
    Is thats correct?

  • This is correct. You must also make sure that the connection is not closed, for example by Active Connection Management. The manual has all the details :) (Chapter 33.7)