comparison src/event/ngx_event.h @ 543:511a89da35ad release-0.2.0

nginx-0.2.0-RELEASE import *) The pid-file names used during online upgrade was changed and now is not required a manual rename operation. The old master process adds the ".oldbin" suffix to its pid-file and executes a new binary file. The new master process creates usual pid-file without the ".newbin" suffix. If the master process exits, then old master process renames back its pid-file with the ".oldbin" suffix to the pid-file without suffix. *) Change: the "worker_connections" directive, new name of the "connections" directive; now the directive specifies maximum number of connections, but not maximum socket descriptor number. *) Feature: SSL supports the session cache inside one worker process. *) Feature: the "satisfy_any" directive. *) Change: the ngx_http_access_module and ngx_http_auth_basic_module do not run for subrequests. *) Feature: the "worker_rlimit_nofile" and "worker_rlimit_sigpending" directives. *) Bugfix: if all backend using in load-balancing failed after one error, then nginx did not try do connect to them during 60 seconds. *) Bugfix: in IMAP/POP3 command argument parsing. Thanks to Rob Mueller. *) Bugfix: errors while using SSL in IMAP/POP3 proxy. *) Bugfix: errors while using SSI and gzipping. *) Bugfix: the "Expires" and "Cache-Control" header lines were omitted from the 304 responses. Thanks to Alexandr Kukushkin.
author Igor Sysoev <igor@sysoev.ru>
date Fri, 23 Sep 2005 11:02:22 +0000
parents 9b8c906f6e63
children ecd9c160f25b
comparison
equal deleted inserted replaced
542:3a7cecdbb994 543:511a89da35ad
216 216
217 extern ngx_event_actions_t ngx_event_actions; 217 extern ngx_event_actions_t ngx_event_actions;
218 218
219 219
220 /* 220 /*
221 * The event filter requires to read/write the whole data - 221 * The event filter requires to read/write the whole data:
222 * select, poll, /dev/poll, kqueue, epoll. 222 * select, poll, /dev/poll, kqueue, epoll.
223 */ 223 */
224 #define NGX_USE_LEVEL_EVENT 0x00000001 224 #define NGX_USE_LEVEL_EVENT 0x00000001
225 225
226 /* 226 /*
227 * The event filter is deleted after a notification without an additional 227 * The event filter is deleted after a notification without an additional
228 * syscall - select, poll, kqueue, epoll, Solaris 10's event ports. 228 * syscall: select, poll, kqueue, epoll, Solaris 10's event ports.
229 */ 229 */
230 #define NGX_USE_ONESHOT_EVENT 0x00000002 230 #define NGX_USE_ONESHOT_EVENT 0x00000002
231 231
232 /* 232 /*
233 * The event filter notifies only the changes and an initial level - 233 * The event filter notifies only the changes and an initial level:
234 * kqueue, epoll. 234 * kqueue, epoll.
235 */ 235 */
236 #define NGX_USE_CLEAR_EVENT 0x00000004 236 #define NGX_USE_CLEAR_EVENT 0x00000004
237 237
238 /* 238 /*
239 * The event filter has kqueue features - the eof flag, errno, 239 * The event filter has kqueue features: the eof flag, errno,
240 * available data, etc. 240 * available data, etc.
241 */ 241 */
242 #define NGX_USE_KQUEUE_EVENT 0x00000008 242 #define NGX_USE_KQUEUE_EVENT 0x00000008
243 243
244 /* 244 /*
245 * The event filter supports low water mark - kqueue's NOTE_LOWAT. 245 * The event filter supports low water mark: kqueue's NOTE_LOWAT.
246 * kqueue in FreeBSD 4.1-4.2 has no NOTE_LOWAT so we need a separate flag. 246 * kqueue in FreeBSD 4.1-4.2 has no NOTE_LOWAT so we need a separate flag.
247 */ 247 */
248 #define NGX_USE_LOWAT_EVENT 0x00000010 248 #define NGX_USE_LOWAT_EVENT 0x00000010
249 249
250 /* 250 /*
251 * The event filter requires to do i/o operation until EAGAIN - 251 * The event filter requires to do i/o operation until EAGAIN:
252 * epoll, rt signals. 252 * epoll, rt signals.
253 */ 253 */
254 #define NGX_USE_GREEDY_EVENT 0x00000020 254 #define NGX_USE_GREEDY_EVENT 0x00000020
255 255
256 /* 256 /*
257 * The event filter is epoll, 257 * The event filter is epoll.
258 */ 258 */
259 #define NGX_USE_EPOLL_EVENT 0x00000040 259 #define NGX_USE_EPOLL_EVENT 0x00000040
260 260
261 /* 261 /*
262 * No need to add or delete the event filters - rt signals. 262 * No need to add or delete the event filters: rt signals.
263 */ 263 */
264 #define NGX_USE_RTSIG_EVENT 0x00000080 264 #define NGX_USE_RTSIG_EVENT 0x00000080
265 265
266 /* 266 /*
267 * No need to add or delete the event filters - overlapped, aio_read, 267 * No need to add or delete the event filters: overlapped, aio_read,
268 * aioread, io_submit. 268 * aioread, io_submit.
269 */ 269 */
270 #define NGX_USE_AIO_EVENT 0x00000100 270 #define NGX_USE_AIO_EVENT 0x00000100
271 271
272 /* 272 /*
273 * Need to add socket or handle only once - i/o completion port. 273 * Need to add socket or handle only once: i/o completion port.
274 * It also requires NGX_HAVE_AIO and NGX_USE_AIO_EVENT to be set. 274 * It also requires NGX_HAVE_AIO and NGX_USE_AIO_EVENT to be set.
275 */ 275 */
276 #define NGX_USE_IOCP_EVENT 0x00000200 276 #define NGX_USE_IOCP_EVENT 0x00000200
277
278 /*
279 * The event filter has no opaque data and requires file descriptors table:
280 * poll, /dev/poll, rt signals.
281 */
282 #define NGX_USE_FD_EVENT 0x00000400
277 283
278 284
279 285
280 /* 286 /*
281 * The event filter is deleted before the closing file. 287 * The event filter is deleted before the closing file.
389 395
390 #define ngx_add_timer ngx_event_add_timer 396 #define ngx_add_timer ngx_event_add_timer
391 #define ngx_del_timer ngx_event_del_timer 397 #define ngx_del_timer ngx_event_del_timer
392 398
393 399
400 extern ngx_os_io_t ngx_io;
401
394 #define ngx_recv ngx_io.recv 402 #define ngx_recv ngx_io.recv
395 #define ngx_recv_chain ngx_io.recv_chain 403 #define ngx_recv_chain ngx_io.recv_chain
396 #define ngx_send ngx_io.send 404 #define ngx_send ngx_io.send
397 #define ngx_send_chain ngx_io.send_chain 405 #define ngx_send_chain ngx_io.send_chain
398
399 406
400 407
401 #define NGX_EVENT_MODULE 0x544E5645 /* "EVNT" */ 408 #define NGX_EVENT_MODULE 0x544E5645 /* "EVNT" */
402 #define NGX_EVENT_CONF 0x02000000 409 #define NGX_EVENT_CONF 0x02000000
403 410
469 476
470 void ngx_event_accept(ngx_event_t *ev); 477 void ngx_event_accept(ngx_event_t *ev);
471 ngx_int_t ngx_trylock_accept_mutex(ngx_cycle_t *cycle); 478 ngx_int_t ngx_trylock_accept_mutex(ngx_cycle_t *cycle);
472 ngx_int_t ngx_disable_accept_events(ngx_cycle_t *cycle); 479 ngx_int_t ngx_disable_accept_events(ngx_cycle_t *cycle);
473 ngx_int_t ngx_enable_accept_events(ngx_cycle_t *cycle); 480 ngx_int_t ngx_enable_accept_events(ngx_cycle_t *cycle);
481 u_char *ngx_accept_log_error(ngx_log_t *log, u_char *buf, size_t len);
474 482
475 483
476 ngx_int_t ngx_handle_read_event(ngx_event_t *rev, u_int flags); 484 ngx_int_t ngx_handle_read_event(ngx_event_t *rev, u_int flags);
477 ngx_int_t ngx_handle_write_event(ngx_event_t *wev, size_t lowat); 485 ngx_int_t ngx_handle_write_event(ngx_event_t *wev, size_t lowat);
478 486
479 487
480 #if (NGX_WIN32) 488 #if (NGX_WIN32)
481 void ngx_event_acceptex(ngx_event_t *ev); 489 void ngx_event_acceptex(ngx_event_t *ev);
482 int ngx_event_post_acceptex(ngx_listening_t *ls, int n); 490 ngx_int_t ngx_event_post_acceptex(ngx_listening_t *ls, ngx_uint_t n);
491 u_char *ngx_acceptex_log_error(ngx_log_t *log, u_char *buf, size_t len);
483 #endif 492 #endif
484 493
485 494
486 ngx_int_t ngx_send_lowat(ngx_connection_t *c, size_t lowat); 495 ngx_int_t ngx_send_lowat(ngx_connection_t *c, size_t lowat);
487 496