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

functions to close a connection More...

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

Go to the source code of this file.

Functions

void MHD_connection_mark_closed_ (struct MHD_Connection *connection)
 
void MHD_connection_close_ (struct MHD_Connection *connection, enum MHD_RequestTerminationCode rtc)
 

Detailed Description

functions to close a connection

Author
Christian Grothoff

Definition in file connection_close.c.

Function Documentation

◆ MHD_connection_close_()

void MHD_connection_close_ ( struct MHD_Connection connection,
enum MHD_RequestTerminationCode  rtc 
)

Close the given connection and give the specified termination code to the user.

Remarks
To be called only from thread that process connection's recv(), send() and response.
Parameters
connectionconnection to close
rtctermination reason to give

Definition at line 83 of file connection_close.c.

References MHD_Connection::daemon, MHD_connection_mark_closed_(), MHD_CONNECTION_NOTIFY_CLOSED, MHD_response_queue_for_destroy(), MHD_Daemon::notify_connection_cb, MHD_Daemon::notify_connection_cb_cls, NULL, MHD_Connection::request, and MHD_Request::response.

Referenced by call_handlers(), close_connection(), close_connection(), connection_close_error(), MHD_connection_call_handlers_(), MHD_request_handle_idle_(), MHD_request_handle_read_(), MHD_run_tls_handshake_(), thread_main_handle_connection(), and try_ready_normal_body().

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

◆ MHD_connection_mark_closed_()

void MHD_connection_mark_closed_ ( struct MHD_Connection connection)

Mark connection as "closed".

Remarks
To be called from any thread.
Parameters
connectionconnection to close

Definition at line 36 of file connection_close.c.

References MHD_TLS_Plugin::cls, MHD_Connection::daemon, MHD_Daemon::enable_turbo, MHD_Request::event_loop_info, MHD_EVENT_LOOP_INFO_CLEANUP, MHD_REQUEST_CLOSED, MHD_YES, NULL, MHD_Connection::request, MHD_TLS_Plugin::shutdown_connection, MHD_Connection::socket_fd, and MHD_Request::state.

Referenced by close_connection(), close_connection(), and MHD_connection_close_().

Here is the caller graph for this function: