Mercurial > hg > nginx-vendor-0-6
comparison src/event/ngx_event.h @ 18:6f8b0dc0f8dd NGINX_0_1_9
nginx 0.1.9
*) Bugfix: the proxied request was sent without arguments if the
request contains "//", "/./", "/../" or "%XX".
*) Bugfix: the large compressed responses may be transferred not
completely.
*) Bugfix: the files bigger than 2G was not transferred on Linux that
does not support sendfile64().
*) Bugfix: while the build configuration on Linux the
--with-poll_module parameter was required; bug appeared in 0.1.8.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Thu, 25 Nov 2004 00:00:00 +0300 |
parents | 74b1868dd3cd |
children | 4989c3d25945 |
comparison
equal
deleted
inserted
replaced
17:9acb68bb0698 | 18:6f8b0dc0f8dd |
---|---|
13 | 13 |
14 | 14 |
15 #define NGX_INVALID_INDEX 0xd0d0d0d0 | 15 #define NGX_INVALID_INDEX 0xd0d0d0d0 |
16 | 16 |
17 | 17 |
18 #if (HAVE_IOCP) | 18 #if (NGX_HAVE_IOCP) |
19 | 19 |
20 typedef struct { | 20 typedef struct { |
21 WSAOVERLAPPED ovlp; | 21 WSAOVERLAPPED ovlp; |
22 ngx_event_t *event; | 22 ngx_event_t *event; |
23 int error; | 23 int error; |
84 #if (NGX_WIN32) | 84 #if (NGX_WIN32) |
85 /* setsockopt(SO_UPDATE_ACCEPT_CONTEXT) was succesfull */ | 85 /* setsockopt(SO_UPDATE_ACCEPT_CONTEXT) was succesfull */ |
86 unsigned accept_context_updated:1; | 86 unsigned accept_context_updated:1; |
87 #endif | 87 #endif |
88 | 88 |
89 #if (HAVE_KQUEUE) | 89 #if (NGX_HAVE_KQUEUE) |
90 unsigned kq_vnode:1; | 90 unsigned kq_vnode:1; |
91 | 91 |
92 /* the pending errno reported by kqueue */ | 92 /* the pending errno reported by kqueue */ |
93 int kq_errno; | 93 int kq_errno; |
94 #endif | 94 #endif |
105 * | 105 * |
106 * otherwise: | 106 * otherwise: |
107 * accept: 1 if accept many, 0 otherwise | 107 * accept: 1 if accept many, 0 otherwise |
108 */ | 108 */ |
109 | 109 |
110 #if (HAVE_KQUEUE) || (HAVE_IOCP) | 110 #if (NGX_HAVE_KQUEUE) || (NGX_HAVE_IOCP) |
111 int available; | 111 int available; |
112 #else | 112 #else |
113 unsigned available:1; | 113 unsigned available:1; |
114 #endif | 114 #endif |
115 | 115 |
116 /* TODO rename to handler */ | 116 /* TODO rename to handler */ |
117 ngx_event_handler_pt event_handler; | 117 ngx_event_handler_pt event_handler; |
118 | 118 |
119 | 119 |
120 #if (HAVE_AIO) | 120 #if (NGX_HAVE_AIO) |
121 | 121 |
122 #if (HAVE_IOCP) | 122 #if (NGX_HAVE_IOCP) |
123 ngx_event_ovlp_t ovlp; | 123 ngx_event_ovlp_t ovlp; |
124 #else | 124 #else |
125 struct aiocb aiocb; | 125 struct aiocb aiocb; |
126 #endif | 126 #endif |
127 | 127 |
152 | 152 |
153 unsigned posted_ready:1; | 153 unsigned posted_ready:1; |
154 unsigned posted_timedout:1; | 154 unsigned posted_timedout:1; |
155 unsigned posted_eof:1; | 155 unsigned posted_eof:1; |
156 | 156 |
157 #if (HAVE_KQUEUE) | 157 #if (NGX_HAVE_KQUEUE) |
158 /* the pending errno reported by kqueue */ | 158 /* the pending errno reported by kqueue */ |
159 int posted_errno; | 159 int posted_errno; |
160 #endif | 160 #endif |
161 | 161 |
162 #if (HAVE_KQUEUE) || (HAVE_IOCP) | 162 #if (NGX_HAVE_KQUEUE) || (NGX_HAVE_IOCP) |
163 int posted_available; | 163 int posted_available; |
164 #else | 164 #else |
165 unsigned posted_available:1; | 165 unsigned posted_available:1; |
166 #endif | 166 #endif |
167 | 167 |
270 */ | 270 */ |
271 #define NGX_USE_AIO_EVENT 0x00000100 | 271 #define NGX_USE_AIO_EVENT 0x00000100 |
272 | 272 |
273 /* | 273 /* |
274 * Need to add socket or handle only once - i/o completion port. | 274 * Need to add socket or handle only once - i/o completion port. |
275 * It also requires HAVE_AIO and NGX_USE_AIO_EVENT to be set. | 275 * It also requires NGX_HAVE_AIO and NGX_USE_AIO_EVENT to be set. |
276 */ | 276 */ |
277 #define NGX_USE_IOCP_EVENT 0x00000200 | 277 #define NGX_USE_IOCP_EVENT 0x00000200 |
278 | 278 |
279 | 279 |
280 | 280 |
294 /* these flags have a meaning only for kqueue */ | 294 /* these flags have a meaning only for kqueue */ |
295 #define NGX_LOWAT_EVENT 0 | 295 #define NGX_LOWAT_EVENT 0 |
296 #define NGX_VNODE_EVENT 0 | 296 #define NGX_VNODE_EVENT 0 |
297 | 297 |
298 | 298 |
299 #if (HAVE_KQUEUE) | 299 #if (NGX_HAVE_KQUEUE) |
300 | 300 |
301 #define NGX_READ_EVENT EVFILT_READ | 301 #define NGX_READ_EVENT EVFILT_READ |
302 #define NGX_WRITE_EVENT EVFILT_WRITE | 302 #define NGX_WRITE_EVENT EVFILT_WRITE |
303 | 303 |
304 #undef NGX_VNODE_EVENT | 304 #undef NGX_VNODE_EVENT |
323 | 323 |
324 #undef NGX_DISABLE_EVENT | 324 #undef NGX_DISABLE_EVENT |
325 #define NGX_DISABLE_EVENT EV_DISABLE | 325 #define NGX_DISABLE_EVENT EV_DISABLE |
326 | 326 |
327 | 327 |
328 #elif (HAVE_DEVPOLL) | 328 #elif (NGX_HAVE_DEVPOLL) |
329 | 329 |
330 #define NGX_READ_EVENT POLLIN | 330 #define NGX_READ_EVENT POLLIN |
331 #define NGX_WRITE_EVENT POLLOUT | 331 #define NGX_WRITE_EVENT POLLOUT |
332 | 332 |
333 #define NGX_LEVEL_EVENT 0 | 333 #define NGX_LEVEL_EVENT 0 |
334 #define NGX_ONESHOT_EVENT 1 | 334 #define NGX_ONESHOT_EVENT 1 |
335 | 335 |
336 | 336 |
337 #elif (HAVE_EPOLL) | 337 #elif (NGX_HAVE_EPOLL) |
338 | 338 |
339 #define NGX_READ_EVENT EPOLLIN | 339 #define NGX_READ_EVENT EPOLLIN |
340 #define NGX_WRITE_EVENT EPOLLOUT | 340 #define NGX_WRITE_EVENT EPOLLOUT |
341 | 341 |
342 #define NGX_LEVEL_EVENT 0 | 342 #define NGX_LEVEL_EVENT 0 |
345 #if 0 | 345 #if 0 |
346 #define NGX_ONESHOT_EVENT EPOLLONESHOT | 346 #define NGX_ONESHOT_EVENT EPOLLONESHOT |
347 #endif | 347 #endif |
348 | 348 |
349 | 349 |
350 #elif (HAVE_POLL) | 350 #elif (NGX_HAVE_POLL) |
351 | 351 |
352 #define NGX_READ_EVENT POLLIN | 352 #define NGX_READ_EVENT POLLIN |
353 #define NGX_WRITE_EVENT POLLOUT | 353 #define NGX_WRITE_EVENT POLLOUT |
354 | 354 |
355 #define NGX_LEVEL_EVENT 0 | 355 #define NGX_LEVEL_EVENT 0 |
362 #define NGX_WRITE_EVENT 1 | 362 #define NGX_WRITE_EVENT 1 |
363 | 363 |
364 #define NGX_LEVEL_EVENT 0 | 364 #define NGX_LEVEL_EVENT 0 |
365 #define NGX_ONESHOT_EVENT 1 | 365 #define NGX_ONESHOT_EVENT 1 |
366 | 366 |
367 #endif /* HAVE_KQUEUE */ | 367 #endif /* NGX_HAVE_KQUEUE */ |
368 | 368 |
369 | 369 |
370 #if (HAVE_IOCP) | 370 #if (NGX_HAVE_IOCP) |
371 #define NGX_IOCP_ACCEPT 0 | 371 #define NGX_IOCP_ACCEPT 0 |
372 #define NGX_IOCP_IO 1 | 372 #define NGX_IOCP_IO 1 |
373 #define NGX_IOCP_CONNECT 2 | 373 #define NGX_IOCP_CONNECT 2 |
374 #endif | 374 #endif |
375 | 375 |