[BUG ?] - IdIPMCastClient : multiple Network cards - listen on a specified adap

Giganews Newsgroups
Subject: [BUG ?] - IdIPMCastClient : multiple Network cards - listen on a specified adap
Posted by:  Anna Jones (n…@valid.com)
Date: Fri, 01 Jul 2005


with computers with multiple network cards, running 2003 server there is
an issue listening with IdIPMCastClient. When starting, 2003 server
seems to randomly choose one of the multiple network adapters as the
default one.

So as only one of the networks adapters is listening to a specified
multicast group the software using IdIPMCastClient sometimes works and
sometimes doesn't.

Even if I choose an IP value in the Bindings property it doesn't work as
the GetBinding function seems to be incorrect ... ??

The IP property of the Bindings doesn't seems to be used anywhere in
GetBinding :

for i := 0 to Bindings.Count - 1 do begin
  Multicast.IMRMultiAddr :=  GStack.StringToTInAddr(FMulticastGroup);
  Multicast.IMRInterface.S_addr :=  Id_INADDR_ANY;
  Bindings[i].SetSockOpt(Id_IPPROTO_IP, Id_IP_ADD_MEMBERSHIP,
                        pchar(@Multicast), SizeOf(Multicast));
FCurrentBinding := Bindings[0];

Shouldn't the Multicast.IMRInterface.S_addr get the value of the
listening adapter IP address from Bindings instead of Id_INADDR_ANY; ?

Is it enough to change Multicast.IMRInterface.S_addr :=  Id_INADDR_ANY;
with Multicast.IMRInterface.S_addr := GStack.StringToTInAddr(AdapterIP)  ...

Thanks for your help !