connection.h File Reference

Methods for managing connections. More...

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

Go to the source code of this file.

Functions

int MHD_connection_get_fdset (struct MHD_Connection *connection, fd_set *read_fd_set, fd_set *write_fd_set, fd_set *except_fd_set, int *max_fd)
int MHD_connection_handle_read (struct MHD_Connection *connection)
int MHD_connection_handle_write (struct MHD_Connection *connection)
int MHD_connection_handle_idle (struct MHD_Connection *connection)


Detailed Description

Methods for managing connections.

Author:
Daniel Pittman

Christian Grothoff

Definition in file connection.h.


Function Documentation

int MHD_connection_get_fdset ( struct MHD_Connection connection,
fd_set *  read_fd_set,
fd_set *  write_fd_set,
fd_set *  except_fd_set,
int *  max_fd 
)

Obtain the select sets for this connection.

Returns:
MHD_YES on success
Obtain the select sets for this connection

Returns:
MHD_YES on success

Definition at line 628 of file connection.c.

References connection_close_error(), MHD_Connection::daemon, do_fd_set(), EXTRA_CHECK, INTERNAL_ERROR, MHD_CONNECTION_BODY_RECEIVED, MHD_CONNECTION_BODY_SENT, MHD_CONNECTION_CHUNKED_BODY_READY, MHD_CONNECTION_CHUNKED_BODY_UNREADY, MHD_CONNECTION_CLOSED, MHD_CONNECTION_CONTINUE_SENDING, MHD_CONNECTION_CONTINUE_SENT, MHD_CONNECTION_FOOTER_PART_RECEIVED, MHD_CONNECTION_FOOTERS_RECEIVED, MHD_CONNECTION_FOOTERS_SENDING, MHD_CONNECTION_FOOTERS_SENT, MHD_CONNECTION_HEADER_PART_RECEIVED, MHD_CONNECTION_HEADERS_PROCESSED, MHD_CONNECTION_HEADERS_RECEIVED, MHD_CONNECTION_HEADERS_SENDING, MHD_CONNECTION_HEADERS_SENT, MHD_CONNECTION_INIT, MHD_CONNECTION_NORMAL_BODY_READY, MHD_CONNECTION_NORMAL_BODY_UNREADY, MHD_CONNECTION_URL_RECEIVED, MHD_HTTP_INTERNAL_SERVER_ERROR, MHD_HTTP_REQUEST_ENTITY_TOO_LARGE, MHD_HTTP_REQUEST_URI_TOO_LONG, MHD_NO, MHD_pool_create(), MHD_USE_SELECT_INTERNALLY, MHD_USE_THREAD_PER_CONNECTION, MHD_YES, MHD_Daemon::options, MHD_Connection::pool, MHD_Daemon::pool_size, MHD_Connection::read_buffer_offset, MHD_Connection::read_buffer_size, MHD_Connection::read_closed, REQUEST_TOO_BIG, MHD_Connection::socket_fd, MHD_Connection::state, transmit_error_response(), try_grow_read_buffer(), and MHD_Connection::url.

Referenced by MHD_get_fdset(), and MHD_handle_connection().

Here is the call graph for this function:

Here is the caller graph for this function:

int MHD_connection_handle_idle ( struct MHD_Connection connection  ) 

This function was created to handle per-connection processing that has to happen even if the socket cannot be read or written to. All implementations (multithreaded, external select, internal select) call this function.

Returns:
MHD_YES if we should continue to process the connection (not dead yet), MHD_NO if it died

Definition at line 1656 of file connection.c.

References build_header_response(), call_connection_handler(), MHD_Connection::client_context, connection_close_error(), MHD_Daemon::connection_timeout, MHD_Connection::continue_message_write_offset, MHD_Response::crc, MHD_Connection::daemon, EXTRA_CHECK, get_next_header_line(), MHD_Connection::have_chunked_upload, MHD_Connection::headers_received, HTTP_100_CONTINUE, MHD_Connection::last_activity, MHD_Connection::method, MHD_CONNECTION_BODY_RECEIVED, MHD_CONNECTION_BODY_SENT, MHD_CONNECTION_CHUNKED_BODY_READY, MHD_CONNECTION_CHUNKED_BODY_UNREADY, MHD_CONNECTION_CLOSED, MHD_CONNECTION_CONTINUE_SENDING, MHD_CONNECTION_CONTINUE_SENT, MHD_CONNECTION_FOOTER_PART_RECEIVED, MHD_CONNECTION_FOOTERS_RECEIVED, MHD_CONNECTION_FOOTERS_SENDING, MHD_CONNECTION_FOOTERS_SENT, MHD_CONNECTION_HEADER_PART_RECEIVED, MHD_CONNECTION_HEADERS_PROCESSED, MHD_CONNECTION_HEADERS_RECEIVED, MHD_CONNECTION_HEADERS_SENDING, MHD_CONNECTION_HEADERS_SENT, MHD_CONNECTION_INIT, MHD_CONNECTION_NORMAL_BODY_READY, MHD_CONNECTION_NORMAL_BODY_UNREADY, MHD_CONNECTION_URL_RECEIVED, MHD_destroy_response(), MHD_FOOTER_KIND, MHD_HEADER_KIND, MHD_HTTP_BAD_REQUEST, MHD_HTTP_HEADER_CONNECTION, MHD_HTTP_VERSION_1_1, MHD_lookup_connection_value(), MHD_NO, MHD_pool_destroy(), MHD_pool_reset(), MHD_REQUEST_TERMINATED_COMPLETED_OK, MHD_YES, MHD_Response::mutex, need_100_continue(), MHD_Daemon::notify_completed, parse_connection_headers(), parse_initial_message_line(), MHD_Connection::pool, process_broken_line(), process_header_line(), MHD_Connection::read_buffer, MHD_Connection::read_buffer_offset, MHD_Connection::read_buffer_size, MHD_Connection::read_closed, MHD_Connection::remaining_upload_size, REQUEST_MALFORMED, MHD_Connection::response, MHD_Connection::response_write_position, MHD_Connection::responseCode, MHD_Connection::socket_fd, MHD_Connection::state, transmit_error_response(), try_ready_chunked_body(), try_ready_normal_body(), MHD_Connection::url, MHD_Connection::version, MHD_Connection::write_buffer, MHD_Connection::write_buffer_append_offset, MHD_Connection::write_buffer_send_offset, and MHD_Connection::write_buffer_size.

Referenced by MHD_handle_connection(), and MHD_select().

Here is the call graph for this function:

Here is the caller graph for this function:

int MHD_connection_handle_read ( struct MHD_Connection connection  ) 

This function handles a particular connection when it has been determined that there is data to be read off a socket. All implementations (multithreaded, external select, internal select) call this function to handle reads.

Returns:
MHD_YES if we should continue to process the connection (not dead yet), MHD_NO if it died
This function handles a particular connection when it has been determined that there is data to be read off a socket. All implementations (multithreaded, external select, internal select) call this function to handle reads.

Returns:
MHD_YES if we should continue to process the connection (not dead yet), MHD_NO if it died

Definition at line 1391 of file connection.c.

References connection_close_error(), do_read(), MHD_Connection::last_activity, MHD_CONNECTION_BODY_RECEIVED, MHD_CONNECTION_CLOSED, MHD_CONNECTION_CONTINUE_SENDING, MHD_CONNECTION_CONTINUE_SENT, MHD_CONNECTION_FOOTER_PART_RECEIVED, MHD_CONNECTION_HEADER_PART_RECEIVED, MHD_CONNECTION_HEADERS_PROCESSED, MHD_CONNECTION_HEADERS_RECEIVED, MHD_CONNECTION_INIT, MHD_CONNECTION_URL_RECEIVED, MHD_NO, MHD_pool_reallocate(), MHD_YES, MHD_Connection::pool, MHD_Connection::read_buffer, MHD_Connection::read_buffer_offset, MHD_Connection::read_buffer_size, MHD_Connection::read_closed, MHD_Connection::socket_fd, and MHD_Connection::state.

Referenced by MHD_handle_connection(), and MHD_select().

Here is the call graph for this function:

Here is the caller graph for this function:

int MHD_connection_handle_write ( struct MHD_Connection connection  ) 

This function was created to handle writes to sockets when it has been determined that the socket can be written to. If there is no data to be written, however, the function call does nothing. All implementations (multithreaded, external select, internal select) call this function

Returns:
MHD_YES if we should continue to process the connection (not dead yet), MHD_NO if it died
This function was created to handle writes to sockets when it has been determined that the socket can be written to. All implementations (multithreaded, external select, internal select) call this function

Returns:
MHD_YES if we should continue to process the connection (not dead yet), MHD_NO if it died

Definition at line 1509 of file connection.c.

References check_write_done(), connection_close_error(), MHD_Connection::continue_message_write_offset, MHD_Response::crc, MHD_Connection::daemon, MHD_Response::data, MHD_Response::data_size, MHD_Response::data_start, do_write(), EXTRA_CHECK, HTTP_100_CONTINUE, MHD_Connection::last_activity, MHD_CONNECTION_BODY_RECEIVED, MHD_CONNECTION_BODY_SENT, MHD_CONNECTION_CHUNKED_BODY_READY, MHD_CONNECTION_CHUNKED_BODY_UNREADY, MHD_CONNECTION_CLOSED, MHD_CONNECTION_CONTINUE_SENDING, MHD_CONNECTION_CONTINUE_SENT, MHD_CONNECTION_FOOTER_PART_RECEIVED, MHD_CONNECTION_FOOTERS_RECEIVED, MHD_CONNECTION_FOOTERS_SENDING, MHD_CONNECTION_FOOTERS_SENT, MHD_CONNECTION_HEADER_PART_RECEIVED, MHD_CONNECTION_HEADERS_PROCESSED, MHD_CONNECTION_HEADERS_RECEIVED, MHD_CONNECTION_HEADERS_SENDING, MHD_CONNECTION_HEADERS_SENT, MHD_CONNECTION_INIT, MHD_CONNECTION_NORMAL_BODY_READY, MHD_CONNECTION_NORMAL_BODY_UNREADY, MHD_CONNECTION_URL_RECEIVED, MHD_NO, MHD_YES, MHD_Response::mutex, MHD_Connection::response, MHD_Connection::response_write_position, SEND, MHD_Connection::socket_fd, MHD_Connection::state, STRERROR, MHD_Response::total_size, and try_ready_normal_body().

Referenced by MHD_handle_connection(), and MHD_select().

Here is the call graph for this function:

Here is the caller graph for this function:


Generated on Fri Oct 3 15:58:33 2008 for GNU libmicrohttpd by  doxygen 1.5.6