GNU libmicrohttpd
0.9.72
|
Declarations of send() wrappers. More...
#include "platform.h"
#include "internal.h"
#include <errno.h>
#include "mhd_sockets.h"
#include "connection.h"
Go to the source code of this file.
Functions | |
ssize_t | MHD_send_data_ (struct MHD_Connection *connection, const char *buffer, size_t buffer_size, bool push_data) |
ssize_t | MHD_send_hdr_and_body_ (struct MHD_Connection *connection, const char *header, size_t header_size, bool never_push_hdr, const char *body, size_t body_size, bool complete_response) |
Declarations of send() wrappers.
Definition in file mhd_send.h.
ssize_t MHD_send_data_ | ( | struct MHD_Connection * | connection, |
const char * | buffer, | ||
size_t | buffer_size, | ||
bool | push_data | ||
) |
Send buffer to the client, push data from network buffer if requested and full buffer is sent.
connection | the MHD_Connection structure |
buffer | content of the buffer to send |
buffer_size | the size of the buffer (in bytes) |
push_data | set to true to force push the data to the network from system buffers (usually set for the last piece of data), set to false to prefer holding incomplete network packets (more data will be send for the same reply). |
Definition at line 662 of file mhd_send.c.
References MHD_Connection::daemon, MHD_CONNECTION_CLOSED, MHD_EPOLL_STATE_WRITE_READY, MHD_ERR_AGAIN_, MHD_ERR_CONNRESET_, MHD_ERR_NOMEM_, MHD_ERR_NOTCONN_, MHD_INVALID_SOCKET, MHD_SCKT_ECONNRESET_, MHD_SCKT_ERR_IS_, MHD_SCKT_ERR_IS_EAGAIN_, MHD_SCKT_ERR_IS_EINTR_, MHD_SCKT_ERR_IS_LOW_RESOURCES_, MHD_SCKT_SEND_MAX_SIZE_, MHD_send4_, MHD_socket_get_error_, MHD_USE_TLS, MHD_Daemon::options, post_send_setopt(), pre_send_setopt(), MHD_Connection::socket_fd, SSIZE_MAX, and MHD_Connection::state.
Referenced by MHD_connection_handle_write(), and MHD_send_hdr_and_body_().
ssize_t MHD_send_hdr_and_body_ | ( | struct MHD_Connection * | connection, |
const char * | header, | ||
size_t | header_size, | ||
bool | never_push_hdr, | ||
const char * | body, | ||
size_t | body_size, | ||
bool | complete_response | ||
) |
Send reply header with optional reply body.
connection | the MHD_Connection structure |
header | content of header to send |
header_size | the size of the header (in bytes) |
never_push_hdr | set to true to disable internal algorithm that can push automatically header data alone to the network |
body | content of the body to send (optional, may be NULL) |
body_size | the size of the body (in bytes) |
complete_response | set to true if complete response is provided by header and body, set to false if additional body data will be sent later |
Definition at line 789 of file mhd_send.c.
References _MHD_SEND_VEC_MAX, MHD_Connection::daemon, mhd_assert, MHD_CONNECTION_CLOSED, MHD_EPOLL_STATE_WRITE_READY, MHD_ERR_AGAIN_, MHD_ERR_CONNRESET_, MHD_ERR_NOMEM_, MHD_ERR_NOTCONN_, MHD_INVALID_SOCKET, MHD_SCKT_ECONNRESET_, MHD_SCKT_ERR_IS_, MHD_SCKT_ERR_IS_EAGAIN_, MHD_SCKT_ERR_IS_EINTR_, MHD_SCKT_ERR_IS_LOW_RESOURCES_, MHD_send_data_(), MHD_socket_get_error_, MHD_USE_TLS, MSG_NOSIGNAL_OR_ZERO, NULL, MHD_Daemon::options, post_send_setopt(), pre_send_setopt(), MHD_Daemon::sigpipe_blocked, MHD_Connection::sk_nonblck, MHD_Connection::sk_spipe_suppress, MHD_Connection::socket_fd, SSIZE_MAX, MHD_Connection::state, and UINT_MAX.
Referenced by MHD_connection_handle_write().