GNU libmicrohttpd  0.9.62
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
request_resume.c File Reference

implementation of MHD_request_resume() More...

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

Go to the source code of this file.

Functions

void MHD_request_resume (struct MHD_Request *request)
 
 mhd_assert (NULL==daemon->worker_pool)
 
 if (daemon->resuming)
 
 mhd_assert (pos->suspended)
 
 DLL_remove (daemon->suspended_connections_head, daemon->suspended_connections_tail, pos)
 
 if (NULL==urh)
 
 if ((used_thr_p_c)&&(ret))
 

Variables

 bool
 
struct MHD_Connectionprev = NULL
 
bool ret = false
 
const bool used_thr_p_c = (MHD_TM_THREAD_PER_CONNECTION == daemon->threading_mode)
 
MHD_mutex_lock_chk_daemon
 
daemon resuming = false
 
 continue
 
pos suspended = false
 

Detailed Description

implementation of MHD_request_resume()

Author
Christian Grothoff

Definition in file request_resume.c.

Function Documentation

DLL_remove ( daemon->  suspended_connections_head,
daemon->  suspended_connections_tail,
pos   
)
if ( daemon->  resuming)

Definition at line 89 of file request_resume.c.

References mhd_assert, NULL, MHD_Daemon::shutdown, and MHD_Daemon::suspended_connections_tail.

Referenced by internal_add_connection(), and tdelete().

Here is the caller graph for this function:

if ( (used_thr_p_c)&&(ret )

Definition at line 179 of file request_resume.c.

References _, and MHD_Daemon::itc.

mhd_assert ( NULL  = =daemon->worker_pool)
mhd_assert ( pos->  suspended)
void MHD_request_resume ( struct MHD_Request request)

Resume handling of network data for suspended request. It is safe to resume a suspended request at any time. Calling this function on a request that was not previously suspended will result in undefined behavior.

If you are using this function in ``external'' select mode, you must make sure to run MHD_run() afterwards (before again calling MHD_get_fdset(), as otherwise the change may not be reflected in the set returned by MHD_get_fdset() and you may end up with a request that is stuck until the next network activity.

Parameters
requestthe request to resume

Definition at line 43 of file request_resume.c.

References _, MHD_Daemon::cleanup_connection_mutex, MHD_Request::connection, daemon, MHD_Request::daemon, MHD_Daemon::disallow_suspend_resume, MHD_Daemon::itc, MHD_mutex_lock_chk_, MHD_mutex_unlock_chk_, MHD_PANIC, MHD_Connection::resuming, and MHD_Daemon::resuming.

Referenced by internal_run_from_select(), MHD_daemon_close_all_connections_(), and thread_main_handle_connection().

Here is the caller graph for this function:

Variable Documentation

bool
Initial value:
{
struct MHD_Connection *pos

Run through the suspended connections and move any that are no longer suspended back to the active state.

Remarks
To be called only from thread that process daemon's select()/poll()/etc.
Parameters
daemondaemon context
Returns
true if a connection was actually resumed

Definition at line 79 of file request_resume.c.

continue

Definition at line 113 of file request_resume.c.

pos resuming = false

Definition at line 96 of file request_resume.c.

pos suspended = false

Definition at line 119 of file request_resume.c.

const bool used_thr_p_c = (MHD_TM_THREAD_PER_CONNECTION == daemon->threading_mode)