tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lorenz Breu <>
Subject Re: tomcat-native: multicast on win32
Date Fri, 13 Feb 2009 15:55:30 GMT
> Try Multicast.loopback if Multicast.join fails.
> Win32 is pretty weired, and not sure why the join doesn't work.
> I suppose the multicast group needs to exists before joining.
no cigar. i first expected an APR_ENOTIMPL or even a failure, but i get
APR_SUCCESS all the way... but nothing actually happens... works fine
with linux though, so i guess it's either me being lucky that linux is
catching my mistake, or there being a problem with the apr code on my
win32 machine (xp pro).

do i need to specify a source when i join a group? isn't NOT specifying
one safer than specifying one, as i want to accept all muslticast
messages to that address, no matter where they come from??

here is what i have been doing:
i actually used 0 instead of the specific interface, then i thought
windows may need to be specified an address, but both approaches do the
same thing: return success and do nothing. all individual steps below

long ifa ="", Socket.APR_INET, 0, 0, pool);
Multicast.ointerface(handle, ifa);
long ra;
ra ="", 0, 0, 0, pool);
Multicast.loopback(handle, true);
Multicast.join(handle, ra, ifa, 0);
Socket.optSet(handle, Socket.APR_SO_NONBLOCK, 1);
Socket.timeoutSet(handle, 0);
Socket.optSet(handle, Socket.APR_SO_REUSEADDR, 1);
Socket.optSet(handle, Socket.APR_SO_RCVBUF,
long sa;
sa =, Socket.APR_INET,
la.getPort(), 0, pool);
result = Socket.bind(handle, sa);

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message