conn_rec
專案位置:libhttpd
檔案位置:include\httpd.h
目的:A structure to store things which are per connection
struct conn_rec {
/** Pool associated with this connection */
apr_pool_t *pool;
/** Physical vhost this conn came in on */
server_rec *base_server;
/** used by http_vhost.c */
void *vhost_lookup_data;
/* Information about the connection itself */
/** 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,
* "" if it has and no address was found. N.B. Only access this though
* get_remote_host() */
char *remote_host;
/** Only ever set if doing rfc1413 lookups. N.B. Only access this through
* get_remote_logname() */
char *remote_logname;
/** Are we still talking? */
unsigned aborted:1;
/** Are we going to keep the connection alive for another request?
* @see ap_conn_keepalive_e */
ap_conn_keepalive_e keepalive;
/** have we done double-reverse DNS? -1 yes/failure, 0 not yet,
* 1 yes/success */
signed int double_reverse:2;
/** How many times have we used it? */
int keepalives;
/** server IP address */
char *local_ip;
/** used for ap_get_server_name when UseCanonicalName is set to DNS
* (ignores setting of HostnameLookups) */
char *local_host;
/** ID of this connection; unique at any point in time */
long id;
/** Config vector containing pointers to connections per-server
* config structures. */
struct ap_conf_vector_t *conn_config;
/** Notes on *this* connection: send note from one module to
* another. must remain valid for all requests on this conn */
apr_table_t *notes;
/** A list of input filters to be used for this connection */
struct ap_filter_t *input_filters;
/** A list of output filters to be used for this connection */
struct ap_filter_t *output_filters;
/** handle to scoreboard information for this connection */
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;
/** Are there any filters that clogg/buffer the input stream, breaking
* the event mpm.
*/
int clogging_input_filters;
};