GNU libmicrohttpd
0.9.72
|
function to call event handlers based on event mask More...
Go to the source code of this file.
Functions | |
int | MHD_connection_call_handlers_ (struct MHD_Connection *con, bool read_ready, bool write_ready, bool force_close) MHD_NONNULL(1) |
bool | MHD_request_handle_idle_ (struct MHD_Request *request) MHD_NONNULL(1) |
function to call event handlers based on event mask
Definition in file connection_call_handlers.h.
int MHD_connection_call_handlers_ | ( | struct MHD_Connection * | con, |
bool | read_ready, | ||
bool | write_ready, | ||
bool | force_close | ||
) |
Call the handlers for a connection in the appropriate order based on the readiness as detected by the event loop.
con | connection to handle |
read_ready | set if the socket is ready for reading |
write_ready | set if the socket is ready for writing |
force_close | set if a hard error was detected on the socket; if this information is not available, simply pass MHD_NO |
Definition at line 3623 of file connection_call_handlers.c.
References MHD_Connection::daemon, MHD_Daemon::data_already_pending, MHD_Request::event_loop_info, MHD_connection_close_(), MHD_EVENT_LOOP_INFO_BLOCK, MHD_EVENT_LOOP_INFO_READ, MHD_EVENT_LOOP_INFO_WRITE, MHD_REQUEST_CHUNKED_BODY_READY, MHD_request_handle_idle_(), MHD_request_handle_read_(), MHD_request_handle_write_(), MHD_REQUEST_HEADERS_SENDING, MHD_REQUEST_INIT, MHD_REQUEST_NORMAL_BODY_READY, MHD_REQUEST_TERMINATED_WITH_ERROR, MHD_Connection::request, MHD_Connection::sk_nonblck, MHD_Request::state, MHD_Daemon::threading_mode, and MHD_Connection::tls_read_ready.
Referenced by thread_main_handle_connection().
bool MHD_request_handle_idle_ | ( | struct MHD_Request * | request | ) |
This function was created to handle per-request processing that has to happen even if the socket cannot be read or written to.
request | the request to handle |
Definition at line 3104 of file connection_call_handlers.c.
References _, build_header_response(), call_request_handler(), cleanup_connection(), MHD_Request::client_context, MHD_TLS_Plugin::cls, MHD_Request::colon, MHD_Request::connection, CONNECTION_CLOSE_ERROR, MHD_Daemon::connection_memory_limit_b, MHD_Connection::connection_timeout, connection_update_event_loop_info(), MHD_Request::continue_message_write_offset, MHD_Response::crc, MHD_Request::daemon, MHD_Daemon::event_loop_syscall, get_next_header_line(), MHD_Request::have_chunked_upload, MHD_Request::header_size, HTTP_100_CONTINUE, MHD_TLS_Plugin::idle_ready, MHD_Request::in_idle, MHD_Request::keepalive, MHD_Request::last, MHD_Connection::last_activity, MHD_Request::method, mhd_assert, MHD_CONN_KEEPALIVE_UNKOWN, MHD_CONN_USE_KEEPALIVE, MHD_connection_close_(), MHD_FOOTER_KIND, MHD_HEADER_KIND, MHD_HTTP_BAD_REQUEST, MHD_HTTP_PROCESSING, MHD_monotonic_sec_counter(), MHD_mutex_lock_chk_, MHD_mutex_unlock_chk_, MHD_NO, MHD_pool_destroy(), MHD_pool_reset(), MHD_REQUEST_BODY_RECEIVED, MHD_REQUEST_BODY_SENT, MHD_REQUEST_CHUNKED_BODY_READY, MHD_REQUEST_CHUNKED_BODY_UNREADY, MHD_REQUEST_CLOSED, MHD_REQUEST_CONTINUE_SENDING, MHD_REQUEST_CONTINUE_SENT, MHD_REQUEST_FOOTER_PART_RECEIVED, MHD_REQUEST_FOOTERS_RECEIVED, MHD_REQUEST_FOOTERS_SENDING, MHD_REQUEST_FOOTERS_SENT, MHD_REQUEST_HEADER_PART_RECEIVED, MHD_REQUEST_HEADERS_PROCESSED, MHD_REQUEST_HEADERS_RECEIVED, MHD_REQUEST_HEADERS_SENDING, MHD_REQUEST_HEADERS_SENT, MHD_REQUEST_INIT, MHD_REQUEST_NORMAL_BODY_READY, MHD_REQUEST_NORMAL_BODY_UNREADY, MHD_REQUEST_TERMINATED_COMPLETED_OK, MHD_REQUEST_TERMINATED_TIMEOUT_REACHED, MHD_REQUEST_URL_RECEIVED, MHD_response_execute_upgrade_(), MHD_response_queue_for_destroy(), MHD_SIZE_UNKNOWN, MHD_STATICSTR_LEN_, MHD_Response::mutex, need_100_continue(), NULL, parse_initial_message_line(), parse_request_headers(), MHD_Connection::pool, process_broken_line(), process_header_line(), process_request_body(), MHD_Request::read_buffer, MHD_Request::read_buffer_offset, MHD_Request::read_buffer_size, MHD_Connection::read_closed, MHD_Request::remaining_upload_size, MHD_Connection::request, REQUEST_MALFORMED, MHD_Request::response, MHD_Request::response_write_position, socket_flush_possible(), socket_start_extra_buffering(), socket_start_no_buffering(), socket_start_no_buffering_flush(), socket_start_normal_buffering(), MHD_Request::state, MHD_Response::status_code, MHD_Connection::suspended, MHD_Response::termination_cb, MHD_Response::termination_cb_cls, MHD_Response::total_size, transmit_error_response(), try_ready_chunked_body(), try_ready_normal_body(), MHD_Request::version_s, MHD_Request::write_buffer_append_offset, and MHD_Request::write_buffer_send_offset.
Referenced by MHD_connection_call_handlers_(), response_action(), and thread_main_handle_connection().