diff options
| author | Igor Sysoev <igor@sysoev.ru> | 2004-10-11 15:07:03 +0000 |
|---|---|---|
| committer | Igor Sysoev <igor@sysoev.ru> | 2004-10-11 15:07:03 +0000 |
| commit | 924bd79e317e9a137c0d1b9d349185758a628ec4 (patch) | |
| tree | f877c8b19e53e7d0a7683e3dd9aeb713146c4a8f /src/event/ngx_event.h | |
| parent | aef13d7f6660f4f8d2c50c95b8e182e62c115f88 (diff) | |
| download | nginx-release-0.1.1.tar.gz nginx-release-0.1.1.tar.bz2 | |
nginx-0.1.1-RELEASE importrelease-0.1.1
*) 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.
Diffstat (limited to 'src/event/ngx_event.h')
| -rw-r--r-- | src/event/ngx_event.h | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/src/event/ngx_event.h b/src/event/ngx_event.h index 7237bd4ec..c173adc05 100644 --- a/src/event/ngx_event.h +++ b/src/event/ngx_event.h @@ -207,7 +207,7 @@ typedef struct { ngx_int_t (*add_conn)(ngx_connection_t *c); ngx_int_t (*del_conn)(ngx_connection_t *c, u_int flags); - ngx_int_t (*process_changes)(ngx_cycle_t *cycle, ngx_uint_t try); + ngx_int_t (*process_changes)(ngx_cycle_t *cycle, ngx_uint_t nowait); ngx_int_t (*process_events)(ngx_cycle_t *cycle); ngx_int_t (*init)(ngx_cycle_t *cycle); @@ -479,6 +479,9 @@ int ngx_event_post_acceptex(ngx_listening_t *ls, int n); #endif +ngx_int_t ngx_send_lowat(ngx_connection_t *c, size_t lowat); + + /* used in ngx_log_debugX() */ #define ngx_event_ident(p) ((ngx_connection_t *) (p))->fd @@ -497,7 +500,7 @@ ngx_inline static int ngx_handle_read_event(ngx_event_t *rev, u_int flags) { if (ngx_event_flags & NGX_USE_CLEAR_EVENT) { - /* kqueue */ + /* kqueue, epoll */ if (!rev->active && !rev->ready) { if (ngx_add_event(rev, NGX_READ_EVENT, NGX_CLEAR_EVENT) @@ -531,7 +534,7 @@ ngx_inline static int ngx_handle_read_event(ngx_event_t *rev, u_int flags) } } - /* aio, iocp, epoll, rtsig */ + /* aio, iocp, rtsig */ return NGX_OK; } @@ -563,14 +566,25 @@ ngx_inline static int ngx_handle_level_read_event(ngx_event_t *rev) } -ngx_inline static int ngx_handle_write_event(ngx_event_t *wev, u_int flags) +ngx_inline static int ngx_handle_write_event(ngx_event_t *wev, size_t lowat) { + ngx_connection_t *c; + + if (lowat) { + c = wev->data; + + if (ngx_send_lowat(c, lowat) == NGX_ERROR) { + return NGX_ERROR; + } + } + if (ngx_event_flags & NGX_USE_CLEAR_EVENT) { - /* kqueue */ + /* kqueue, epoll */ if (!wev->active && !wev->ready) { - if (ngx_add_event(wev, NGX_WRITE_EVENT, NGX_CLEAR_EVENT|flags) + if (ngx_add_event(wev, NGX_WRITE_EVENT, + NGX_CLEAR_EVENT | (lowat ? NGX_LOWAT_EVENT : 0)) == NGX_ERROR) { return NGX_ERROR; @@ -602,7 +616,7 @@ ngx_inline static int ngx_handle_write_event(ngx_event_t *wev, u_int flags) } } - /* aio, iocp, epoll, rtsig */ + /* aio, iocp, rtsig */ return NGX_OK; } |
