>> Do a need different ip (group ) per each interface
>
> Yes
Unfortunetly it doesn't work :( only default interface is used
private static final String defaultIP = "239.0.2.10"; <-this is changed
depended on interface number
public void setInterface(NetworkInterface i){
try {
logger.info("MulticastAnnounce setting interface");
this.address = InetAddress.getByName(defaultIP);
this.socket = new MulticastSocket(port);
this.socket.setNetworkInterface(i);
this.socket.joinGroup(this.address);
logger.info("MulticastSocket Annoucer success");
this.socket = socket;
}catch(Exception e){
logger.error("Cannot set network Interface:"+e.toString());
}
Esmond Pitt - 22 Oct 2007 05:32 GMT
setInterface() is really only useful for outbound traffic. You need to
use the version of join() where you specify the NetworkInterface, in a
loop, so that you join the group via all available NICs.
tricky - 22 Oct 2007 17:43 GMT
It works under windows but not under linux :(
> setInterface() is really only useful for outbound traffic. You need to use
> the version of join() where you specify the NetworkInterface, in a loop,
> so that you join the group via all available NICs.