summaryrefslogtreecommitdiff
path: root/include/mpm_common.h
diff options
context:
space:
mode:
authorEric Covener <covener@apache.org>2014-05-11 20:41:45 +0000
committerEric Covener <covener@apache.org>2014-05-11 20:41:45 +0000
commitd758951456f57f3496aa4d7855a043eb41f74f07 (patch)
treea526e108dd14409104194998be66505467a7ed05 /include/mpm_common.h
parent8b7d9aa14281bad40c11a446f3a617296d46d1dc (diff)
downloadhttpd-d758951456f57f3496aa4d7855a043eb41f74f07.tar.gz
Extend the socket callbacks in event to allow a timeout on the I/O callback.
When a socket callback has a timeout, an associated timer event is used to remove the sockets from the pollset and call a timeout function. * This includes a noteworthy change to the main event loop. Previously, we would call epoll, then process the timer events, then iterate through the poll results. After this patch, the timer events are processed before the poll() a _non-queued_ action can change the pollset conents (a users timed callback function conversely could easily sit in a queue while the main thread continues down into epoll) * timer events can now have sockets associated with them, those sockets are removed from the pollset when the timer event fires w/o a queue to the worker. * timer events now have a canceled flag that can be toggled without locking the timer list. * Drop the severity of some wstunnel messages from DEBUG to TRACE1 * Lift the restriction on using asynchronous websockets connections but having an idle timeout git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1593857 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'include/mpm_common.h')
-rw-r--r--include/mpm_common.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/mpm_common.h b/include/mpm_common.h
index aefec952d3..44a693fbb3 100644
--- a/include/mpm_common.h
+++ b/include/mpm_common.h
@@ -429,6 +429,16 @@ AP_DECLARE_HOOK(apr_status_t, mpm_register_timed_callback,
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))
+/* 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,
+ ap_mpm_callback_fn_t *cbfn,
+ ap_mpm_callback_fn_t *tofn,
+ void *baton,
+ apr_time_t timeout))
/**
* Unregister the specified callback
* @ingroup hooks