httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Graham Leggett <minf...@sharp.fm>
Subject Re: Proposed change to mpm_register_socket_callback(): apr_socket_t -> apr_pollfd_t
Date Mon, 14 Mar 2016 11:07:37 GMT
On 14 Mar 2016, at 10:32 AM, Yann Ylavic <ylavic.dev@gmail.com> wrote:

> Since apr_pollfd_t is not opaque (unlike apr_socket_t), maybe we could
> remove the indirection here (and in the code below) with somthing like
> (apr_pollfd_t *pfds, size_t npfds, ...).
> That would allow a single allocation (all pfds in once) and possibly
> make things easier for the caller.

This definitely makes sense.

I originally wondered whether we could pass an apr_array_header_t into it, but it felt like
overkill. Doing it your way means that we could use an array if we wanted to, or we could
just pass structures on the stack, which would be much more flexible.

Regards,
Graham
—


Mime
View raw message