GNU libmicrohttpd
0.9.72
|
function to close all connections open at a daemon More...
#include "internal.h"
#include "connection_cleanup.h"
#include "connection_close.h"
#include "connection_finish_forward.h"
#include "daemon_close_all_connections.h"
#include "request_resume.h"
#include "upgrade_process.h"
Go to the source code of this file.
Functions | |
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
Definition in file daemon_close_all_connections.c.
|
static |
Close the given connection, remove it from all of its DLLs and move it into the cleanup queue.
pos | connection to move to cleanup |
Definition at line 43 of file daemon_close_all_connections.c.
References MHD_Daemon::cleanup_connection_mutex, MHD_Daemon::cleanup_head, MHD_Daemon::cleanup_tail, MHD_Daemon::connection_default_timeout, MHD_Connection::connection_timeout, MHD_Daemon::connections_head, MHD_Daemon::connections_tail, MHD_Connection::daemon, DLL_insert, DLL_remove, MHD_Daemon::manual_timeout_head, MHD_Daemon::manual_timeout_tail, mhd_assert, MHD_connection_close_(), MHD_connection_mark_closed_(), MHD_mutex_lock_chk_, MHD_mutex_unlock_chk_, MHD_REQUEST_TERMINATED_DAEMON_SHUTDOWN, MHD_Daemon::normal_timeout_head, MHD_Daemon::normal_timeout_tail, MHD_Connection::resuming, MHD_Connection::suspended, MHD_Daemon::threading_mode, and XDLL_remove.
Referenced by MHD_daemon_close_all_connections_().
void MHD_daemon_close_all_connections_ | ( | struct MHD_Daemon * | daemon | ) |
Close all connections for the daemon. Must only be called when MHD_Daemon::shutdown was set to true.
daemon | daemon to close down |
Definition at line 89 of file daemon_close_all_connections.c.
References _, MHD_Daemon::cleanup_connection_mutex, close_connection(), MHD_Daemon::connections_tail, MHD_Connection::daemon, MHD_Daemon::disallow_suspend_resume, MHD_Daemon::disallow_upgrade, MHD_Daemon::itc, mhd_assert, MHD_connection_cleanup_(), MHD_connection_finish_forward_(), MHD_mutex_lock_chk_, MHD_mutex_unlock_chk_, MHD_PANIC, MHD_request_resume(), MHD_resume_suspended_connections_(), NULL, MHD_Connection::pid, MHD_Connection::prev, MHD_Connection::request, MHD_Connection::resuming, MHD_Daemon::resuming, MHD_Daemon::shutdown, MHD_Connection::socket_fd, MHD_Daemon::suspended_connections_head, MHD_Daemon::suspended_connections_tail, MHD_Connection::thread_joined, MHD_Daemon::threading_mode, and MHD_Daemon::worker_pool.
Referenced by MHD_daemon_destroy(), and MHD_daemon_start().