GNU libmicrohttpd  0.9.29
MHD_Response Struct Reference

#include </builddir/build/BUILD/libmicrohttpd-0.9.52/src/microhttpd/internal.h>

Data Fields

struct MHD_HTTP_Headerfirst_header
 
char * data
 
void * crc_cls
 
MHD_ContentReaderCallback crc
 
MHD_ContentReaderFreeCallback crfc
 
MHD_UpgradeHandler upgrade_handler
 
void * upgrade_handler_cls
 
MHD_mutex_ mutex
 
uint64_t total_size
 
uint64_t data_start
 
uint64_t fd_off
 
size_t data_size
 
size_t data_buffer_size
 
unsigned int reference_count
 
int fd
 
enum MHD_ResponseFlags flags
 

Detailed Description

Representation of a response.

Definition at line 264 of file internal.h.

Field Documentation

◆ crc

MHD_ContentReaderCallback MHD_Response::crc

How do we get more data? NULL if we are given all of the data up front.

Definition at line 290 of file internal.h.

Referenced by MHD_connection_handle_idle(), MHD_connection_handle_write(), MHD_create_response_from_callback(), MHD_create_response_from_data(), try_ready_chunked_body(), and try_ready_normal_body().

◆ crc_cls

void* MHD_Response::crc_cls

Closure to give to the content reader crc and content reader free callback crfc.

Definition at line 284 of file internal.h.

Referenced by MHD_create_response_from_callback(), MHD_create_response_from_data(), MHD_create_response_from_fd_at_offset64(), MHD_destroy_response(), try_ready_chunked_body(), and try_ready_normal_body().

◆ crfc

MHD_ContentReaderFreeCallback MHD_Response::crfc

NULL if data must not be freed, otherwise either user-specified callback or "&free".

Definition at line 296 of file internal.h.

Referenced by MHD_create_response_from_callback(), MHD_create_response_from_data(), and MHD_destroy_response().

◆ data

char* MHD_Response::data

Buffer pointing to data that we are supposed to send as a response.

Definition at line 278 of file internal.h.

Referenced by MHD_connection_handle_write(), MHD_create_response_from_callback(), MHD_create_response_from_data(), try_ready_chunked_body(), and try_ready_normal_body().

◆ data_buffer_size

size_t MHD_Response::data_buffer_size

Size of the data buffer data.

Definition at line 341 of file internal.h.

Referenced by MHD_create_response_from_callback(), and try_ready_normal_body().

◆ data_size

size_t MHD_Response::data_size

Number of bytes ready in data (buffer may be larger than what is filled with payload).

Definition at line 336 of file internal.h.

Referenced by MHD_connection_handle_write(), MHD_create_response_from_data(), try_ready_chunked_body(), and try_ready_normal_body().

◆ data_start

uint64_t MHD_Response::data_start

At what offset in the stream is the beginning of data located?

Definition at line 325 of file internal.h.

Referenced by MHD_connection_handle_write(), try_ready_chunked_body(), and try_ready_normal_body().

◆ fd

int MHD_Response::fd

◆ fd_off

uint64_t MHD_Response::fd_off

Offset to start reading from when using fd.

Definition at line 330 of file internal.h.

Referenced by file_reader(), MHD_create_response_from_fd_at_offset64(), and send_param_adapter().

◆ first_header

struct MHD_HTTP_Header* MHD_Response::first_header

Headers to send for the response. Initially the linked list is created in inverse order; the order should be inverted before sending!

Definition at line 272 of file internal.h.

Referenced by add_response_entry(), build_header_response(), MHD_del_response_header(), MHD_destroy_response(), MHD_get_response_header(), and MHD_get_response_headers().

◆ flags

enum MHD_ResponseFlags MHD_Response::flags

Flags set for the MHD response.

Definition at line 357 of file internal.h.

Referenced by build_header_response(), keepalive_possible(), and MHD_set_response_options().

◆ mutex

◆ reference_count

unsigned int MHD_Response::reference_count

Reference count for this response. Free once the counter hits zero.

Definition at line 347 of file internal.h.

Referenced by MHD_create_response_for_upgrade(), MHD_create_response_from_callback(), MHD_create_response_from_data(), MHD_destroy_response(), and MHD_increment_response_rc().

◆ total_size

◆ upgrade_handler

MHD_UpgradeHandler MHD_Response::upgrade_handler

Application function to call once we are done sending the headers of the response; NULL unless this is a response created with MHD_create_response_for_upgrade().

Definition at line 303 of file internal.h.

Referenced by keepalive_possible(), MHD_connection_handle_idle(), MHD_create_response_for_upgrade(), MHD_queue_response(), and MHD_response_execute_upgrade_().

◆ upgrade_handler_cls

void* MHD_Response::upgrade_handler_cls

Closure for uh.

Definition at line 308 of file internal.h.

Referenced by MHD_create_response_for_upgrade(), and MHD_response_execute_upgrade_().


The documentation for this struct was generated from the following file: