GNU libmicrohttpd 0.9.77
Loading...
Searching...
No Matches
connection_add.h File Reference

functions to add connection to our active set More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

enum MHD_StatusCode MHD_accept_connection_ (struct MHD_Daemon *daemon) MHD_NONNULL(1)
 

Detailed Description

functions to add connection to our active set

Author
Christian Grothoff

Definition in file connection_add.h.

Function Documentation

◆ MHD_accept_connection_()

enum MHD_StatusCode MHD_accept_connection_ ( struct MHD_Daemon daemon)

Accept an incoming connection and create the MHD_Connection object for it. This function also enforces policy by way of checking with the accept policy callback.

Remarks
To be called only from thread that process daemon's select()/poll()/etc.
Parameters
daemonhandle with the listen socket
Returns
#MHD_SC_OK on success

Definition at line 1014 of file connection_add.c.

References _, MHD_Daemon::at_limit, MHD_Daemon::cleanup_connection_mutex, MHD_Daemon::connections, fd, internal_add_connection(), MHD_Daemon::listen_socket, MAYBE_SOCK_CLOEXEC, MAYBE_SOCK_NONBLOCK, MHD_INVALID_SOCKET, MHD_mutex_lock_chk_, MHD_mutex_unlock_chk_, MHD_SCKT_EINVAL_, MHD_SCKT_ERR_IS_, MHD_SCKT_ERR_IS_DISCNN_BEFORE_ACCEPT_, MHD_SCKT_ERR_IS_EAGAIN_, MHD_SCKT_ERR_IS_LOW_RESOURCES_, MHD_socket_close_chk_, MHD_socket_get_error_, MHD_socket_last_strerr_, MHD_socket_nonblocking_(), MHD_socket_noninheritable_(), MHD_socket_strerr_, and MHD_Daemon::was_quiesced.

Referenced by internal_run_from_select().

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