93 #ifdef UPGRADE_SUPPORT 96 #if defined(HTTPS_SUPPORT) && defined(UPGRADE_SUPPORT) 97 struct MHD_UpgradeResponseHandle *urh;
98 struct MHD_UpgradeResponseHandle *urhn;
99 const bool used_tls = (
NULL != daemon->tls_api);
105 for (urh = daemon->urh_tail;
NULL != urh; urh = urhn)
110 MHD_upgrade_response_handle_process_ (urh);
112 urh->clean_ready =
true;
130 #ifdef UPGRADE_SUPPORT 139 MHD_PANIC (
_(
"MHD_stop_daemon() called while we have suspended connections.\n"));
143 (! susp->
request.urh->clean_ready) )
144 shutdown (susp->
request.urh->app.socket,
150 if (! susp->
request.urh->was_closed)
152 MHD_SC_SHUTDOWN_WITH_OPEN_UPGRADED_CONNECTION,
153 _(
"Initiated daemon shutdown while \"upgraded\" connection was not closed.\n"));
155 susp->
request.urh->was_closed =
true;
171 MHD_PANIC (
_(
"MHD_stop_daemon() called while we have suspended connections.\n"));
176 #if MHD_WINSOCK_SOCKETS 177 if ( (used_thr_p_c) &&
181 MHD_PANIC (
_(
"Failed to signal shutdown via inter-thread communication channel"));
194 if (! MHD_join_thread_ (pos->
pid.handle))
208 #ifdef UPGRADE_SUPPORT 223 if ( (used_thr_p_c) &&
struct MHD_Request request
struct MHD_Connection * cleanup_head
#define MHD_mutex_unlock_chk_(pmutex)
struct MHD_Connection * manual_timeout_head
MHD_thread_handle_ID_ pid
internal shared structures
struct MHD_Daemon * daemon
time_t connection_default_timeout
#define DLL_insert(head, tail, element)
struct MHD_Connection * connections_tail
struct MHD_Daemon * worker_pool
functions to close connection
static void close_connection(struct MHD_Connection *pos)
struct MHD_Connection * connections_head
function to close all connections open at a daemon
void MHD_connection_mark_closed_(struct MHD_Connection *connection)
void MHD_connection_close_(struct MHD_Connection *connection, enum MHD_RequestTerminationCode rtc)
complete upgrade socket forwarding operation in TLS mode
time_t connection_timeout
struct MHD_Connection * manual_timeout_tail
functions to cleanup completed connection
struct MHD_Connection * prev
#define DLL_remove(head, tail, element)
struct MHD_Connection * normal_timeout_head
void MHD_request_resume(struct MHD_Request *request)
void MHD_daemon_close_all_connections_(struct MHD_Daemon *daemon)
void MHD_connection_finish_forward_(struct MHD_Connection *connection) MHD_NONNULL(1)
#define XDLL_remove(head, tail, element)
struct MHD_Connection * suspended_connections_tail
struct MHD_Connection * cleanup_tail
struct MHD_Connection * normal_timeout_tail
#define MHD_mutex_lock_chk_(pmutex)
void MHD_connection_cleanup_(struct MHD_Daemon *daemon)
bool disallow_suspend_resume
struct MHD_Connection * suspended_connections_head
bool MHD_resume_suspended_connections_(struct MHD_Daemon *daemon)
enum MHD_ThreadingMode threading_mode
MHD_mutex_ cleanup_connection_mutex
function to process upgrade activity (over TLS)
implementation of MHD_request_resume()