Mercurial > hg > nginx-quic
comparison src/event/ngx_event.h @ 452:23fb87bddda1 release-0.1.1
nginx-0.1.1-RELEASE import
*) Feature: the gzip_types directive.
*) Feature: the tcp_nodelay directive.
*) Feature: the send_lowat directive is working not only on OSes that
support kqueue NOTE_LOWAT, but also on OSes that support SO_SNDLOWAT.
*) Feature: the setproctitle() emulation for Linux and Solaris.
*) Bugfix: the "Location" header rewrite bug fixed while the proxying.
*) Bugfix: the ngx_http_chunked_module module may get caught in an
endless loop.
*) Bugfix: the /dev/poll module bugs fixed.
*) Bugfix: the responses were corrupted when the temporary files were
used while the proxying.
*) Bugfix: the unescaped requests were passed to the backend.
*) Bugfix: while the build configuration on Linux 2.4 the
--with-poll_module parameter was required.
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Mon, 11 Oct 2004 15:07:03 +0000 |
parents | 42d11f017717 |
children | 295d97d70c69 |
comparison
equal
deleted
inserted
replaced
451:f40362e47689 | 452:23fb87bddda1 |
---|---|
205 ngx_int_t (*disable)(ngx_event_t *ev, int event, u_int flags); | 205 ngx_int_t (*disable)(ngx_event_t *ev, int event, u_int flags); |
206 | 206 |
207 ngx_int_t (*add_conn)(ngx_connection_t *c); | 207 ngx_int_t (*add_conn)(ngx_connection_t *c); |
208 ngx_int_t (*del_conn)(ngx_connection_t *c, u_int flags); | 208 ngx_int_t (*del_conn)(ngx_connection_t *c, u_int flags); |
209 | 209 |
210 ngx_int_t (*process_changes)(ngx_cycle_t *cycle, ngx_uint_t try); | 210 ngx_int_t (*process_changes)(ngx_cycle_t *cycle, ngx_uint_t nowait); |
211 ngx_int_t (*process_events)(ngx_cycle_t *cycle); | 211 ngx_int_t (*process_events)(ngx_cycle_t *cycle); |
212 | 212 |
213 ngx_int_t (*init)(ngx_cycle_t *cycle); | 213 ngx_int_t (*init)(ngx_cycle_t *cycle); |
214 void (*done)(ngx_cycle_t *cycle); | 214 void (*done)(ngx_cycle_t *cycle); |
215 } ngx_event_actions_t; | 215 } ngx_event_actions_t; |
477 void ngx_event_acceptex(ngx_event_t *ev); | 477 void ngx_event_acceptex(ngx_event_t *ev); |
478 int ngx_event_post_acceptex(ngx_listening_t *ls, int n); | 478 int ngx_event_post_acceptex(ngx_listening_t *ls, int n); |
479 #endif | 479 #endif |
480 | 480 |
481 | 481 |
482 ngx_int_t ngx_send_lowat(ngx_connection_t *c, size_t lowat); | |
483 | |
484 | |
482 /* used in ngx_log_debugX() */ | 485 /* used in ngx_log_debugX() */ |
483 #define ngx_event_ident(p) ((ngx_connection_t *) (p))->fd | 486 #define ngx_event_ident(p) ((ngx_connection_t *) (p))->fd |
484 | 487 |
485 | 488 |
486 #include <ngx_event_timer.h> | 489 #include <ngx_event_timer.h> |
495 | 498 |
496 ngx_inline static int ngx_handle_read_event(ngx_event_t *rev, u_int flags) | 499 ngx_inline static int ngx_handle_read_event(ngx_event_t *rev, u_int flags) |
497 { | 500 { |
498 if (ngx_event_flags & NGX_USE_CLEAR_EVENT) { | 501 if (ngx_event_flags & NGX_USE_CLEAR_EVENT) { |
499 | 502 |
500 /* kqueue */ | 503 /* kqueue, epoll */ |
501 | 504 |
502 if (!rev->active && !rev->ready) { | 505 if (!rev->active && !rev->ready) { |
503 if (ngx_add_event(rev, NGX_READ_EVENT, NGX_CLEAR_EVENT) | 506 if (ngx_add_event(rev, NGX_READ_EVENT, NGX_CLEAR_EVENT) |
504 == NGX_ERROR) { | 507 == NGX_ERROR) { |
505 return NGX_ERROR; | 508 return NGX_ERROR; |
529 | 532 |
530 return NGX_OK; | 533 return NGX_OK; |
531 } | 534 } |
532 } | 535 } |
533 | 536 |
534 /* aio, iocp, epoll, rtsig */ | 537 /* aio, iocp, rtsig */ |
535 | 538 |
536 return NGX_OK; | 539 return NGX_OK; |
537 } | 540 } |
538 | 541 |
539 | 542 |
561 | 564 |
562 return NGX_OK; | 565 return NGX_OK; |
563 } | 566 } |
564 | 567 |
565 | 568 |
566 ngx_inline static int ngx_handle_write_event(ngx_event_t *wev, u_int flags) | 569 ngx_inline static int ngx_handle_write_event(ngx_event_t *wev, size_t lowat) |
567 { | 570 { |
571 ngx_connection_t *c; | |
572 | |
573 if (lowat) { | |
574 c = wev->data; | |
575 | |
576 if (ngx_send_lowat(c, lowat) == NGX_ERROR) { | |
577 return NGX_ERROR; | |
578 } | |
579 } | |
580 | |
568 if (ngx_event_flags & NGX_USE_CLEAR_EVENT) { | 581 if (ngx_event_flags & NGX_USE_CLEAR_EVENT) { |
569 | 582 |
570 /* kqueue */ | 583 /* kqueue, epoll */ |
571 | 584 |
572 if (!wev->active && !wev->ready) { | 585 if (!wev->active && !wev->ready) { |
573 if (ngx_add_event(wev, NGX_WRITE_EVENT, NGX_CLEAR_EVENT|flags) | 586 if (ngx_add_event(wev, NGX_WRITE_EVENT, |
587 NGX_CLEAR_EVENT | (lowat ? NGX_LOWAT_EVENT : 0)) | |
574 == NGX_ERROR) | 588 == NGX_ERROR) |
575 { | 589 { |
576 return NGX_ERROR; | 590 return NGX_ERROR; |
577 } | 591 } |
578 } | 592 } |
600 | 614 |
601 return NGX_OK; | 615 return NGX_OK; |
602 } | 616 } |
603 } | 617 } |
604 | 618 |
605 /* aio, iocp, epoll, rtsig */ | 619 /* aio, iocp, rtsig */ |
606 | 620 |
607 return NGX_OK; | 621 return NGX_OK; |
608 } | 622 } |
609 | 623 |
610 | 624 |