diff options
author | Ryan Bloom <rbb@apache.org> | 2001-11-13 00:49:08 +0100 |
---|---|---|
committer | Ryan Bloom <rbb@apache.org> | 2001-11-13 00:49:08 +0100 |
commit | 0c05b625acb9f1128715da18e1b4929a67ac26cc (patch) | |
tree | d38baba73a72a6d149723ba5f70231ef0624300e /include | |
parent | fix segv triggered by recent ap_lingering_close change (diff) | |
download | apache2-0c05b625acb9f1128715da18e1b4929a67ac26cc.tar.xz apache2-0c05b625acb9f1128715da18e1b4929a67ac26cc.zip |
Begin to abstract out the underlying transport layer.
The first step is to remove the socket from the conn_rec,
the server now lives in a context that is passed to the
core's input and output filters. This forces us to be very
careful when adding calls that use the socket directly,
because the socket isn't available in most locations.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91887 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'include')
-rw-r--r-- | include/http_connection.h | 13 | ||||
-rw-r--r-- | include/httpd.h | 32 |
2 files changed, 39 insertions, 6 deletions
diff --git a/include/http_connection.h b/include/http_connection.h index ae00cfd7fa..cb13d29fff 100644 --- a/include/http_connection.h +++ b/include/http_connection.h @@ -128,6 +128,19 @@ AP_DECLARE_HOOK(int,pre_connection,(conn_rec *c)) */ AP_DECLARE_HOOK(int,process_connection,(conn_rec *c)) +/** + */ +AP_DECLARE_HOOK(conn_rec *, create_connection, + (apr_pool_t *p, apr_socket_t *csd, int child_num)) + +/* This is NOT staying here. It is necessary to quiet warnings + * while I would on the next patch. rbb + */ + +AP_CORE_DECLARE(conn_rec *)ap_core_new_connection(apr_pool_t *p, + server_rec *server, apr_socket_t *inout, + core_net_rec *net, long id); + #ifdef __cplusplus } #endif diff --git a/include/httpd.h b/include/httpd.h index 52cc8df16c..45120988dc 100644 --- a/include/httpd.h +++ b/include/httpd.h @@ -80,6 +80,7 @@ #include "apr_pools.h" #include "apr_time.h" #include "apr_network_io.h" +#include "apr_buckets.h" #include "pcreposix.h" @@ -327,7 +328,6 @@ extern "C" { */ #define AP_MAX_SENDFILE 16777216 - /** * Special Apache error codes. These are basically used * in http_main.c so we can keep track of various errors. @@ -914,15 +914,11 @@ struct conn_rec { /* Information about the connection itself */ - /** Connection to the client */ - apr_socket_t *client_socket; - - /* Who is the client? */ - /** local address */ apr_sockaddr_t *local_addr; /** remote address */ apr_sockaddr_t *remote_addr; + /** Client's IP address */ char *remote_ip; /** Client's DNS name, if known. NULL if DNS hasn't been checked, @@ -1058,6 +1054,30 @@ struct server_rec { int limit_req_fields; }; +typedef struct core_output_filter_ctx { + apr_bucket_brigade *b; + apr_pool_t *subpool; /* subpool of c->pool used for data saved after a + * request is finished + */ + int subpool_has_stuff; /* anything in the subpool? */ +} core_output_filter_ctx_t; + +typedef struct core_filter_ctx { + apr_bucket_brigade *b; + int first_line; +} core_ctx_t; + +typedef struct core_net_rec { + /** Connection to the client */ + apr_socket_t *client_socket; + + /** connection record */ + conn_rec *c; + + core_output_filter_ctx_t *out_ctx; + core_ctx_t *in_ctx; +} core_net_rec; + /** * Examine a field value (such as a media-/content-type) string and return * it sans any parameters; e.g., strip off any ';charset=foo' and the like. |