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

Bidirectional problem


In my solution there is two types of applications (app A and app B).
I want to create bidirectional "p2p" communication beetwen them.
But, each of these applications can initiate connection to other (app A can connect to B or app B can connect to A).
So in Ice terms each application can work as server or as client.

How is the simplest way to achieve this type of configuration ?
Any example?


  • xdm
    xdm La Coruña, Spain
    If the problem is that you don't know the address of the other peer you can try to do a multicast discovery,

    Ice-3.6b adds a new IceDiscovery plug-in that could be used for that see:

    If you are restricted to an older Ice version look at demo/Ice/multicast
  • matthew
    matthew NL, Canada
    It isn't clear what environment your application is working over (LAN, private WAN, WAN). If you are working a WAN environment then likely multicast discovery won't work well. In that case the easiest way to solve your problem is via a well-known mediator. In this case, the clients first contact the mediator to establish communications. Once the clients have exchanged address information then they can talk directly without the mediator involved.