aboutsummaryrefslogtreecommitdiff
path: root/src/microhttpd/mhd_itc.h
diff options
context:
space:
mode:
authorEvgeny Grin (Karlson2k) <k2k@narod.ru>2016-10-11 15:21:14 +0000
committerEvgeny Grin (Karlson2k) <k2k@narod.ru>2016-10-11 15:21:14 +0000
commit924451b713b8a7bc84c742d7b82af24025c00812 (patch)
tree8c4c9c03d7dd8d8d91a5114bc12d92a123d3f84b /src/microhttpd/mhd_itc.h
parentee182a0b2995f562637f8c97f4591f6d55c4a0fb (diff)
downloadlibmicrohttpd-924451b713b8a7bc84c742d7b82af24025c00812.tar.gz
libmicrohttpd-924451b713b8a7bc84c742d7b82af24025c00812.zip
Renamed 'MHD_pipe_get_write_fd_' -> 'MHD_itc_r_fd_', 'MHD_pipe_get_write_fd_' -> 'MHD_itc_w_fd_'
Doxy added.
Diffstat (limited to 'src/microhttpd/mhd_itc.h')
-rw-r--r--src/microhttpd/mhd_itc.h42
1 files changed, 36 insertions, 6 deletions
diff --git a/src/microhttpd/mhd_itc.h b/src/microhttpd/mhd_itc.h
index c30fc632..5dd73869 100644
--- a/src/microhttpd/mhd_itc.h
+++ b/src/microhttpd/mhd_itc.h
@@ -75,9 +75,19 @@ static const uint64_t _MHD_itc_wr_data = 1;
75#define MHD_itc_activate_(itc, str) \ 75#define MHD_itc_activate_(itc, str) \
76 ((write((itc), (const void*)&_MHD_itc_wr_data, 8) > 0) || (EAGAIN == errno)) 76 ((write((itc), (const void*)&_MHD_itc_wr_data, 8) > 0) || (EAGAIN == errno))
77 77
78#define MHD_pipe_get_read_fd_(pip) (pip) 78/**
79 * Return read FD of @a itc which can be used for poll(), select() etc.
80 * @param itc the itc to get FD
81 * @return FD of read side
82 */
83#define MHD_itc_r_fd_(itc) ((int)(itc))
79 84
80#define MHD_pipe_get_write_fd_(pip) (pip) 85/**
86 * Return write FD of @a itc
87 * @param itc the itc to get FD
88 * @return FD of write side
89 */
90#define MHD_itc_w_fd_(itc) ((int)(itc))
81 91
82/** 92/**
83 * drain data from real pipe 93 * drain data from real pipe
@@ -153,9 +163,19 @@ static const uint64_t _MHD_itc_wr_data = 1;
153 ((write((itc).fd[1], (const void*)(str), 1) > 0) || (EAGAIN == errno)) 163 ((write((itc).fd[1], (const void*)(str), 1) > 0) || (EAGAIN == errno))
154 164
155 165
156#define MHD_pipe_get_read_fd_(pip) ((pip).fd[0]) 166/**
167 * Return read FD of @a itc which can be used for poll(), select() etc.
168 * @param itc the itc to get FD
169 * @return FD of read side
170 */
171#define MHD_itc_r_fd_(itc) ((itc).fd[0])
157 172
158#define MHD_pipe_get_write_fd_(pip) ((pip).fd[1]) 173/**
174 * Return write FD of @a itc
175 * @param itc the itc to get FD
176 * @return FD of write side
177 */
178#define MHD_itc_w_fd_(itc) ((itc).fd[1])
159 179
160/** 180/**
161 * drain data from real pipe 181 * drain data from real pipe
@@ -228,9 +248,19 @@ MHD_itc_nonblocking_ (MHD_itc_ itc);
228 ((send((itc).sk[1], (const char*)(str), 1, 0) > 0) || \ 248 ((send((itc).sk[1], (const char*)(str), 1, 0) > 0) || \
229 (MHD_SCKT_ERR_IS_EAGAIN_(MHD_socket_get_error_()))) 249 (MHD_SCKT_ERR_IS_EAGAIN_(MHD_socket_get_error_())))
230 250
231#define MHD_pipe_get_read_fd_(pip) ((pip).sk[0]) 251/**
252 * Return read FD of @a itc which can be used for poll(), select() etc.
253 * @param itc the itc to get FD
254 * @return FD of read side
255 */
256#define MHD_itc_r_fd_(itc) ((itc).sk[0])
232 257
233#define MHD_pipe_get_write_fd_(pip) ((pip).sk[1]) 258/**
259 * Return write FD of @a itc
260 * @param itc the itc to get FD
261 * @return FD of write side
262 */
263#define MHD_itc_w_fd_(itc) ((itc).sk[1])
234 264
235/** 265/**
236 * Drain data from emulated pipe 266 * Drain data from emulated pipe