GNU libmicrohttpd
0.9.72
|
functions to set per-connection options More...
#include "internal.h"
Go to the source code of this file.
Functions | |
void | MHD_connection_set_timeout (struct MHD_Connection *connection, unsigned int timeout_s) |
void | MHD_update_last_activity_ (struct MHD_Connection *connection) |
functions to set per-connection options
Definition in file connection_options.c.
void MHD_connection_set_timeout | ( | struct MHD_Connection * | connection, |
unsigned int | timeout_s | ||
) |
Set custom timeout for the given connection. Specified as the number of seconds. Use zero for no timeout. Calling this function will reset timeout timer.
connection | connection to configure timeout for |
timeout_s | new timeout in seconds |
Definition at line 37 of file connection_options.c.
References MHD_Daemon::cleanup_connection_mutex, MHD_Daemon::connection_default_timeout, MHD_Connection::connection_timeout, MHD_Connection::daemon, MHD_Connection::last_activity, MHD_Daemon::manual_timeout_head, MHD_Daemon::manual_timeout_tail, MHD_monotonic_sec_counter(), MHD_mutex_lock_chk_, MHD_mutex_unlock_chk_, MHD_Daemon::normal_timeout_head, MHD_Daemon::normal_timeout_tail, MHD_Connection::suspended, MHD_Daemon::threading_mode, XDLL_insert, and XDLL_remove.
void MHD_update_last_activity_ | ( | struct MHD_Connection * | connection | ) |
Update the 'last_activity' field of the connection to the current time and move the connection to the head of the 'normal_timeout' list if the timeout for the connection uses the default value.
connection | the connection that saw some activity |
Definition at line 88 of file connection_options.c.
References MHD_Daemon::cleanup_connection_mutex, MHD_Daemon::connection_default_timeout, MHD_Connection::connection_timeout, MHD_Connection::daemon, MHD_Connection::last_activity, MHD_monotonic_sec_counter(), MHD_mutex_lock_chk_, MHD_mutex_unlock_chk_, MHD_Daemon::normal_timeout_head, MHD_Daemon::normal_timeout_tail, MHD_Connection::suspended, MHD_Daemon::threading_mode, XDLL_insert, and XDLL_remove.
Referenced by MHD_run_tls_handshake_().