GNU libmicrohttpd  0.9.73
mhd_send.h
Go to the documentation of this file.
1 /*
2  This file is part of libmicrohttpd
3  Copyright (C) 2017, 2020 Karlson2k (Evgeny Grin)
4  Copyright (C) 2019 ng0
5 
6  This library is free software; you can redistribute it and/or
7  modify it under the terms of the GNU Lesser General Public
8  License as published by the Free Software Foundation; either
9  version 2.1 of the License, or (at your option) any later version.
10 
11  This library is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  Lesser General Public License for more details.
15 
16  You should have received a copy of the GNU Lesser General Public
17  License along with this library; if not, write to the Free Software
18  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 
20 */
21 
29 #ifndef MHD_SEND_H
30 #define MHD_SEND_H
31 
32 #include "platform.h"
33 #include "internal.h"
34 #if defined(HAVE_STDBOOL_H)
35 #include <stdbool.h>
36 #endif /* HAVE_STDBOOL_H */
37 #include <errno.h>
38 #include "mhd_sockets.h"
39 #include "connection.h"
40 #ifdef HTTPS_SUPPORT
41 #include "connection_https.h"
42 #endif
43 
44 #if defined(HAVE_SENDMSG) || defined(HAVE_WRITEV) || \
45  defined(MHD_WINSOCK_SOCKETS)
46 #define MHD_VECT_SEND 1
47 #endif /* HAVE_SENDMSG || HAVE_WRITEV || MHD_WINSOCK_SOCKETS */
48 
52 void
54 
55 
70 ssize_t
71 MHD_send_data_ (struct MHD_Connection *connection,
72  const char *buffer,
73  size_t buffer_size,
74  bool push_data);
75 
76 
95 ssize_t
96 MHD_send_hdr_and_body_ (struct MHD_Connection *connection,
97  const char *header,
98  size_t header_size,
99  bool never_push_hdr,
100  const char *body,
101  size_t body_size,
102  bool complete_response);
103 
104 #if defined(_MHD_HAVE_SENDFILE)
105 
111 ssize_t
112 MHD_send_sendfile_ (struct MHD_Connection *connection);
113 
114 #endif
115 
116 
126 bool
128  bool nodelay_state);
129 
130 
141 bool
143  bool cork_state);
144 
145 
157 ssize_t
158 MHD_send_iovec_ (struct MHD_Connection *connection,
159  struct MHD_iovec_track_ *const r_iov,
160  bool push_data);
161 
162 
163 #endif /* MHD_SEND_H */
MHD_send_init_static_vars_
void MHD_send_init_static_vars_(void)
Definition: mhd_send.c:153
MHD_iovec_track_
Definition: internal.h:381
MHD_connection_set_cork_state_
bool MHD_connection_set_cork_state_(struct MHD_Connection *connection, bool cork_state)
Definition: mhd_send.c:240
MHD_connection_set_nodelay_state_
bool MHD_connection_set_nodelay_state_(struct MHD_Connection *connection, bool nodelay_state)
Definition: mhd_send.c:170
connection_https.h
Methods for managing connections.
MHD_send_data_
ssize_t MHD_send_data_(struct MHD_Connection *connection, const char *buffer, size_t buffer_size, bool push_data)
Definition: mhd_send.c:749
internal.h
internal shared structures
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)
Definition: mhd_send.c:892
mhd_sockets.h
platform.h
platform-specific includes for libmicrohttpd
MHD_send_iovec_
ssize_t MHD_send_iovec_(struct MHD_Connection *connection, struct MHD_iovec_track_ *const r_iov, bool push_data)
Definition: mhd_send.c:1599
connection.h
Methods for managing connections.
MHD_Connection
Definition: internal.h:634