apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Colm MacCarthaigh <c...@stdlib.net>
Subject Re: Multicast + poll with APR
Date Tue, 23 Jan 2007 16:41:45 GMT
On Tue, Jan 23, 2007 at 03:49:41PM +0100, Laurent Pointal wrote:
> I'm trying to setup multicast reception with polling sockets.
> 
> Q? Is this possible: multicast + DGRAM (UDP) + polling ?

Yep, it is :-)

> apr_socket_bind
> 	=> bind socket to sock_addr

You don't need to bindto the group-id, although this is works on *nix,
just bind to the interface address or the unspecified address (0.0.0.0
or ::).

> *** I have a failure here, using address 239.192.10.10:12345       ***
> *** Error APR 730049                                               ***
> *** [in english ~= requested address is not valid in its context]  ***
> *** I tried blocking/non-blocking socket options, same result      ***
> 
> For multicast, I have the following operations:
> 	apr_mcast_hops
> 		=> setup mcast routing zone
> 	apr_mcast_loopback
> 		=> allow loopback on mcast
> 	apr_mcast_join
> 		=> join mcast group

You need to do a join to send an IGMP/MLD request before your network
will forward you packets for the multicast group-id. 

> apr_pollset_add
> 	=> add socket to poll for APR_POLLIN

That will work as per any other socket.

-- 
Colm MacCárthaigh                        Public Key: colm+pgp@stdlib.net

Mime
View raw message