apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Querna <c...@force-elite.com>
Subject multicast?
Date Fri, 17 Dec 2004 15:47:18 GMT
So, I have a ~70% done implementation this 'apr_mcast' api.

I am on air planes all day today, so hopefully I can finish up the code.

Any comments on the following API:

/**
  * @defgroup apr_mcast IP Multicast
  * @{
  */

/**
  * Join a Multicast Group
  * @param sock The socket to join a multicast group
  * @param join The address of the multicast group to join
  * @param iface Address of the interface to use.  If NULL is passed, the
  *              defautl multicast interface will be used. (OS Dependent)
  */
APR_DECLARE(apr_status_t) apr_mcast_join(apr_socket_t *sock,
                                          apr_sockaddr_t *join,
                                          apr_sockaddr_t *iface);



/**
  * Leave a Multicast Group.  All arguments must be the same as
  * apr_mcast_join.
  * @param sock The socket to leave a multicast group
  * @param join The address of the multicast group to join
  * @param iface Address of the interface to use.  If NULL is passed, the
  *              defautl multicast interface will be used. (OS Dependent)
  */
APR_DECLARE(apr_status_t) apr_mcast_leave(apr_socket_t *sock,
                                           apr_sockaddr_t *leave,
                                           apr_sockaddr_t *iface);

/**
  * Set the Multicast Time to Live (ttl) for a socket.
  * @param sock The socket to set the multicast ttl
  * @param ttl Time to live to Assign. 0-255, default=1
  * @remark If the TTL is 0, packets will only be seen by sockets on
  * the local machine, with multicast loopback enabled.
  */
APR_DECLARE(apr_status_t) apr_mcast_ttl(apr_socket_t *sock,
                                         apr_byte_t ttl);


/**
  * Enable or disable IP Multicast Loopback
  * @param sock The socket to set multicast loopback
  * @param opt 0=disable, 1=enable
  */
APR_DECLARE(apr_status_t) apr_mcast_loopback(apr_socket_t *sock,
                                              apr_byte_t opt);


/** @} */


Not sure if we want a different base name.. 'apr_socket_multicast' vs 
apr_socket_mcast' vs 'apr_multicast'.

-Paul

Mime
View raw message