Home Help Center

multicast demo: combining server and client

n2503vn2503v Member Alex MakarenkoOrganization: ACFR, University of SydneyProject: Orca ✭✭✭
I'm playing with multi-cast for an academic research project.

The multicast demo works fine.

I tried to modify it so that one executable would be a server and a client. The idea is to have one executable per host which listens on a multicast address and also sends out messages to the same address.

The problem is that when this new "peer" sends messages only its own local object receives them. The other instances of the executable (on the same host) don't revieve anything. Not sure how to debug this. Network and Protocol traces produce no output.

Is this supposed to work?

The configuration is identical to the demo but I'm using a simplified interface (with a single setData() method).

Many thanks as always,

Ice-3.3, Linux, C++.


  • dwaynedwayne St. John's, NewfoundlandMember Dwayne BooneOrganization: ZeroC, Inc.Project: Internet Communications Engine

    I expect the issue you are running into is collocation optimization. In your dual executable Ice compares the endpoints of the proxy and the adapter and determines that the object is local and thus makes a direct invocation rather than using the network. To prevent this from happening you need to disable the collocation optimization on your multicast proxy:

    proxy = proxy->ice_collocationOptimized(false);

  • n2503vn2503v Member Alex MakarenkoOrganization: ACFR, University of SydneyProject: Orca ✭✭✭
    Thanks Dwayne, you were right on.

    That's exactly what it felt like but I forgot about the optimization feature. Maybe it's worth putting a note on this in the manual as it has an unexpected result in the context of multicasting.

    It's all working now.
Sign In or Register to comment.