From 7c7f8c467c8b6af678faf10078d7a59c3856045a Mon Sep 17 00:00:00 2001 From: Glenn Strauss Date: Sun, 12 Jan 2020 21:51:12 -0500 Subject: [multiple] split con, request (very large change) NB: r->tmp_buf == srv->tmp_buf (pointer is copied for quicker access) NB: request read and write chunkqueues currently point to connection chunkqueues; per-request and per-connection chunkqueues are not distinct from one another con->read_queue == r->read_queue con->write_queue == r->write_queue NB: in the future, a separate connection config may be needed for connection-level module hooks. Similarly, might need to have per-request chunkqueues separate from per-connection chunkqueues. Should probably also have a request_reset() which is distinct from connection_reset(). --- src/connections.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/connections.h') diff --git a/src/connections.h b/src/connections.h index 263e51b3..0b513c4b 100644 --- a/src/connections.h +++ b/src/connections.h @@ -18,10 +18,13 @@ connection * connection_accepted(server *srv, server_socket *srv_socket, sock_ad const char * connection_get_state(request_state_t state); const char * connection_get_short_state(request_state_t state); int connection_state_machine(connection *con); -handler_t connection_handle_read_post_state(connection *con); -handler_t connection_handle_read_post_error(connection *con, int http_status); +handler_t connection_handle_read_post_state(request_st *r); + +__attribute_cold__ +handler_t connection_handle_read_post_error(request_st *r, int http_status); + int connection_write_chunkqueue(connection *con, chunkqueue *c, off_t max_bytes); -void connection_response_reset(connection *con); +void connection_response_reset(request_st *r); #define joblist_append(con) connection_list_append(&(con)->srv->joblist, (con)) void connection_list_append(connections *conns, connection *con); -- cgit v1.2.1