These are chat archives for IndySockets/Indy
procedure TForm1.SendBroadcast(const AServer: TIdIPMCastServer; const ABroadcast: string); var I: Integer; begin for I := 0 to FLocalAddresses.Count - 1 do begin if FLocalAddresses[I].IPVersion = AServer.IPVersion then begin AServer.Active := False; AServer.BoundIP := FLocalAddresses[I].IPAddress; AServer.BoundPort := AServer.Port; AServer.Active := True; AServer.Send(ABroadcast); end; end; end;
AServer.MulticastGroup? Is that group valid on all networks you are trying to bind to?
setsockopt()when adding a local IP to the multicast group, which is done after the socket is bound locally. The local IP that is being passed in is
in6addr_any), which comes from the
TIdSocketHandle.IPproperty, which is updated after binding. If the socket is bound to a specific local IP and not to in6addr_any, the
TIdSocketHandle.IPproperty should not be all zeros. That implies a possible failure in
TIdSocketHandle.UpdateBindingLocal(). But no matter, because the local IP is not currently being passed to
setsockopt(IPV6_ADD_MEMBERSHIP)in IPv6, it is set to the default multicast interface instead. Maybe that is what iOS is complaining about.