comparison src/event/ngx_event.h @ 87:5f6d848dcbef

nginx-0.0.1-2003-05-13-20:02:32 import
author Igor Sysoev <igor@sysoev.ru>
date Tue, 13 May 2003 16:02:32 +0000
parents 3973260705cc
children 37530da31268
comparison
equal deleted inserted replaced
86:3973260705cc 87:5f6d848dcbef
26 #endif 26 #endif
27 27
28 28
29 struct ngx_event_s { 29 struct ngx_event_s {
30 void *data; 30 void *data;
31 31 void (*event_handler)(ngx_event_t *ev);
32 int (*event_handler)(ngx_event_t *ev); 32
33 #if 0
33 int (*close_handler)(ngx_event_t *ev); 34 int (*close_handler)(ngx_event_t *ev);
35 #endif
34 void *context; 36 void *context;
35 char *action; 37 char *action;
36 38
37 unsigned int index; 39 unsigned int index;
38 40
39 ngx_event_t *prev; /* queue in mutex(), aio_read(), aio_write() */ 41 ngx_event_t *prev; /* queue in mutex(), aio_read(), aio_write() */
40 ngx_event_t *next; /* */ 42 ngx_event_t *next; /* */
41 43
44 #if 0
42 int (*timer_handler)(ngx_event_t *ev); 45 int (*timer_handler)(ngx_event_t *ev);
46 #endif
43 ngx_event_t *timer_prev; 47 ngx_event_t *timer_prev;
44 ngx_event_t *timer_next; 48 ngx_event_t *timer_next;
45 49
46 ngx_msec_t timer_delta; 50 ngx_msec_t timer_delta;
47 ngx_msec_t timer; 51 ngx_msec_t timer;
163 /* The event filter has kqueue features - the eof flag, errno, 167 /* The event filter has kqueue features - the eof flag, errno,
164 available data, etc */ 168 available data, etc */
165 #define NGX_HAVE_KQUEUE_EVENT 8 169 #define NGX_HAVE_KQUEUE_EVENT 8
166 170
167 /* The event filter supports low water mark - kqueue's NOTE_LOWAT. 171 /* The event filter supports low water mark - kqueue's NOTE_LOWAT.
168 Early kqueue implementations have no NOTE_LOWAT so we need a separate flag */ 172 kqueue in FreeBSD 4.1-4.2 has no NOTE_LOWAT so we need a separate flag */
169 #define NGX_HAVE_LOWAT_EVENT 0x00000010 173 #define NGX_HAVE_LOWAT_EVENT 0x00000010
170 174
171 /* The event filter notifies only the changes (the edges) 175 /* The event filter notifies only the changes (the edges)
172 but not an initial level - epoll */ 176 but not an initial level - epoll */
173 #define NGX_HAVE_EDGE_EVENT 0x00000020 177 #define NGX_HAVE_EDGE_EVENT 0x00000020
292 #if !(HAVE_EPOLL) 296 #if !(HAVE_EPOLL)
293 #define ngx_edge_add_event(ev) NGX_ERROR 297 #define ngx_edge_add_event(ev) NGX_ERROR
294 #endif 298 #endif
295 299
296 300
301 void ngx_event_accept(ngx_event_t *ev);
302
303
297 ssize_t ngx_event_recv_core(ngx_connection_t *c, char *buf, size_t size); 304 ssize_t ngx_event_recv_core(ngx_connection_t *c, char *buf, size_t size);
298 int ngx_event_close_connection(ngx_event_t *ev); 305 int ngx_event_close_connection(ngx_event_t *ev);
299 306
300 307
301 void ngx_pre_thread(ngx_array_t *ls, ngx_pool_t *pool, ngx_log_t *log); 308 void ngx_pre_thread(ngx_array_t *ls, ngx_pool_t *pool, ngx_log_t *log);