apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yle dev <yle....@gmail.com>
Subject New apr_os_sockaddr_t type, apr_os_sockaddr_get, apr_os_sockaddr_put and apr_sockaddr_dup functions
Date Tue, 19 Apr 2011 13:56:09 GMT
I have written a patch to provide a new OS native sockaddr type (called
apr_os_sockaddr_t).
The new functions apr_os_sockaddr_get() / apr_os_sockaddr_put() allow to
convert from / to the apr_sockaddr_t (like apr_os_socket_t / apr_socket_t
conversion).

Unlike apr_sockaddr_t, this "serialized" type can be placed in shared memory
for multiple processes to use it.
I find it very useful for an apache's mod_proxy patch I'm writting (and
submitting to dev@httpd), where the current backend address is updated
according to a TTL parameter (and shared between the children).
The sockaddr info has to be in the scoreboard for this to be feasible.

Finally, the patch also provides a apr_sockaddr_dup function which is
terribly missing (IMHO), one may want to copy an address from a pool to
another without a new DNS lookup.

The joined patches are for trunk and 1.4.x.
Thanks for your feedback,
Yann.

Mime
View raw message