diff options
author | Paul Querna <pquerna@apache.org> | 2004-11-20 03:52:36 +0100 |
---|---|---|
committer | Paul Querna <pquerna@apache.org> | 2004-11-20 03:52:36 +0100 |
commit | 34959f29dbce591e85a77cba44602994aaf48bb0 (patch) | |
tree | aff6a2d876901f11dc058c9a075591bc303a6956 /include | |
parent | Replace the hack to remove CVS directories with one for Subversion '.svn' dir... (diff) | |
download | apache2-34959f29dbce591e85a77cba44602994aaf48bb0.tar.xz apache2-34959f29dbce591e85a77cba44602994aaf48bb0.zip |
The Event MPM.
Designed to minimize Apache's KeepAlive overhead.
This MPM depends on the current APR-trunk for new features added to
the apr_pollset interface. Currently the underlying operating
system must support KQueue or EPoll.
Status:
Should work as a drop in replacement for all non-ssl servers.
SSL Requests that use HTTP 1.1 Pipelining do not currently work.
Testing:
I have tested it with Linux 2.6, FreeBSD 5.2.1, and OS X 10.3.
Originally based on the patch by Greg Ames.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105919 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'include')
-rw-r--r-- | include/ap_mpm.h | 1 | ||||
-rw-r--r-- | include/httpd.h | 23 |
2 files changed, 24 insertions, 0 deletions
diff --git a/include/ap_mpm.h b/include/ap_mpm.h index ce351aff31..758c694a2f 100644 --- a/include/ap_mpm.h +++ b/include/ap_mpm.h @@ -139,6 +139,7 @@ AP_DECLARE(apr_status_t) ap_os_create_privileged_process( #define AP_MPMQ_MAX_REQUESTS_DAEMON 11 /* Max # of requests per daemon */ #define AP_MPMQ_MAX_DAEMONS 12 /* Max # of daemons by config */ #define AP_MPMQ_MPM_STATE 13 /* starting, running, stopping */ +#define AP_MPMQ_IS_ASYNC 14 /* MPM can process async connections */ /** * Query a property of the current MPM. diff --git a/include/httpd.h b/include/httpd.h index 8ff392bf8f..47e40c9254 100644 --- a/include/httpd.h +++ b/include/httpd.h @@ -37,6 +37,7 @@ #include "apr_time.h" #include "apr_network_io.h" #include "apr_buckets.h" +#include "apr_poll.h" #include "os.h" @@ -675,6 +676,8 @@ typedef struct server_rec server_rec; typedef struct conn_rec conn_rec; /** A structure that represents the current request */ typedef struct request_rec request_rec; +/** A structure that represents the status of the current connection */ +typedef struct conn_state_t conn_state_t; /* ### would be nice to not include this from httpd.h ... */ /* This comes after we have defined the request_rec type */ @@ -1011,6 +1014,26 @@ struct conn_rec { void *sbh; /** The bucket allocator to use for all bucket/brigade creations */ struct apr_bucket_alloc_t *bucket_alloc; + /** The current state of this connection */ + conn_state_t *cs; + /** Is there data pending in the input filters? */ + int data_in_input_filters; +}; + +typedef enum { + CONN_STATE_CHECK_REQUEST_LINE_READABLE, + CONN_STATE_READ_REQUEST_LINE, + CONN_STATE_LINGER, +} conn_state_e; + +struct conn_state_t { + APR_RING_ENTRY(conn_state_t) timeout_list; + apr_time_t expiration_time; + conn_state_e state; + conn_rec *c; + apr_pool_t *p; + apr_bucket_alloc_t *bucket_alloc; + apr_pollfd_t pfd; }; /* Per-vhost config... */ |