Hi all,
I would like to propose a change to the mpm_register_socket_callback() hooks to
add the ability to support both pipes as well as sockets. In addition, I need
more control over the individual events to support the idea that one
socket/pipe might want to read at the same time another might want to write.
What I have in mind is to swap the apr_socket_t with a apr_pollfd_t, with all
operation staying the same.
Index: include/mpm_common.h
===================================================================
--- include/mpm_common.h (revision 1734657)
+++ include/mpm_common.h (working copy)
@@ -427,14 +427,14 @@
* @ingroup hooks
*/
AP_DECLARE_HOOK(apr_status_t, mpm_register_socket_callback,
- (apr_socket_t **s, apr_pool_t *p, int for_read,
ap_mpm_callback_fn_t *cbfn, void *baton))
+ (apr_pollfd_t **pds, apr_pool_t *p, ap_mpm_callback_fn_t
*cbfn, void *baton))
/* register the specified callback, with timeout
* @ingroup hooks
*
*/
AP_DECLARE_HOOK(apr_status_t, mpm_register_socket_callback_timeout,
- (apr_socket_t **s, apr_pool_t *p, int for_read,
+ (apr_pollfd_t **pds, apr_pool_t *p,
ap_mpm_callback_fn_t *cbfn,
ap_mpm_callback_fn_t *tofn,
void *baton,
@@ -444,7 +444,7 @@
* @ingroup hooks
*/
AP_DECLARE_HOOK(apr_status_t, mpm_unregister_socket_callback,
- (apr_socket_t **s, apr_pool_t *p))
+ (apr_pollfd_t **pds, apr_pool_t *p))
/** Resume the suspended connection
* @ingroup hooks
Regards,
Graham
—