92 const bool used_thr_p_c = (MHD_TM_THREAD_PER_CONNECTION ==
97#if defined(HTTPS_SUPPORT) && defined(UPGRADE_SUPPORT)
98 struct MHD_UpgradeResponseHandle *urh;
99 struct MHD_UpgradeResponseHandle *urhn;
100 const bool used_tls = (
NULL != daemon->tls_api);
106 for (urh = daemon->urh_tail;
NULL != urh; urh = urhn)
111 MHD_upgrade_response_handle_process_ (urh);
113 urh->clean_ready =
true;
131#ifdef UPGRADE_SUPPORT
141 "MHD_stop_daemon() called while we have suspended connections.\n"));
145 (! susp->
request.urh->clean_ready) )
146 shutdown (susp->
request.urh->app.socket,
152 if (! susp->
request.urh->was_closed)
154 MHD_SC_SHUTDOWN_WITH_OPEN_UPGRADED_CONNECTION,
156 "Initiated daemon shutdown while \"upgraded\" connection was not closed.\n"));
158 susp->
request.urh->was_closed =
true;
175 "MHD_stop_daemon() called while we have suspended connections.\n"));
180#if MHD_WINSOCK_SOCKETS
181 if ( (used_thr_p_c) &&
186 "Failed to signal shutdown via inter-thread communication channel.\n"));
199 if (! MHD_join_thread_ (pos->
pid.handle))
213#ifdef UPGRADE_SUPPORT
228 if ( (used_thr_p_c) &&
#define MHD_connection_finish_forward_(conn)
void MHD_connection_cleanup_(struct MHD_Daemon *daemon)
functions to cleanup completed connection
void MHD_connection_mark_closed_(struct MHD_Connection *connection)
void MHD_connection_close_(struct MHD_Connection *connection, enum MHD_RequestTerminationCode rtc)
functions to close connection
complete upgrade socket forwarding operation in TLS mode
static void close_connection(struct MHD_Connection *pos)
void MHD_daemon_close_all_connections_(struct MHD_Daemon *daemon)
function to close all connections open at a daemon
@ MHD_REQUEST_TERMINATED_DAEMON_SHUTDOWN
#define DLL_insert(head, tail, element)
#define XDLL_remove(head, tail, element)
#define DLL_remove(head, tail, element)
#define MHD_mutex_unlock_chk_(pmutex)
#define MHD_mutex_lock_chk_(pmutex)
MHD internal shared structures.
void MHD_request_resume(struct MHD_Request *request)
bool MHD_resume_suspended_connections_(struct MHD_Daemon *daemon)
implementation of MHD_request_resume()
struct MHD_Request request
time_t connection_timeout
struct MHD_Connection * prev
MHD_thread_handle_ID_ pid
struct MHD_Daemon * daemon
MHD_mutex_ cleanup_connection_mutex
struct MHD_Connection * connections_head
struct MHD_Connection * manual_timeout_tail
bool disallow_suspend_resume
struct MHD_Connection * cleanup_tail
struct MHD_Daemon * worker_pool
time_t connection_default_timeout
struct MHD_Connection * manual_timeout_head
struct MHD_Connection * suspended_connections_tail
struct MHD_Connection * cleanup_head
struct MHD_Connection * normal_timeout_head
struct MHD_Connection * normal_timeout_tail
enum MHD_ThreadingMode threading_mode
struct MHD_Connection * suspended_connections_head
struct MHD_Connection * connections_tail
function to process upgrade activity (over TLS)