GNU libmicrohttpd 0.9.77
Loading...
Searching...
No Matches
connection_options.c File Reference

functions to set per-connection options More...

#include "internal.h"
Include dependency graph for connection_options.c:

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)
 

Detailed Description

functions to set per-connection options

Author
Christian Grothoff

Definition in file connection_options.c.

Function Documentation

◆ MHD_connection_set_timeout()

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.

Parameters
connectionconnection to configure timeout for
timeout_snew 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.

Here is the call graph for this function:

◆ MHD_update_last_activity_()

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.

Parameters
connectionthe 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_().

Here is the call graph for this function:
Here is the caller graph for this function: