comparison src/core/ngx_listen.h @ 44:0e81ac0bb3e2

nginx-0.0.1-2003-01-09-08:36:00 import
author Igor Sysoev <igor@sysoev.ru>
date Thu, 09 Jan 2003 05:36:00 +0000
parents 77c7629a2627
children a499e0d1f16e
comparison
equal deleted inserted replaced
43:53cd05892261 44:0e81ac0bb3e2
7 #include <ngx_types.h> 7 #include <ngx_types.h>
8 #include <ngx_socket.h> 8 #include <ngx_socket.h>
9 #include <ngx_connection.h> 9 #include <ngx_connection.h>
10 10
11 typedef struct { 11 typedef struct {
12 ngx_socket_t fd; 12 ngx_socket_t fd;
13 13
14 struct sockaddr *sockaddr; 14 struct sockaddr *sockaddr;
15 socklen_t socklen; 15 socklen_t socklen; /* size of sockaddr */
16 size_t addr; 16 int addr; /* offset to address in sockaddr */
17 int addr_text_max_len;
17 ngx_str_t addr_text; 18 ngx_str_t addr_text;
18 19
19 int family; 20 int family;
20 int type; 21 int type;
21 int protocol; 22 int protocol;
22 int flags; 23 int flags; /* Winsock2 flags */
23 24
24 ngx_log_t *log; 25 int (*handler)(ngx_connection_t *c); /* handler of accepted
25 void *server; 26 connection */
26 int (*handler)(ngx_connection_t *c); 27 void *ctx; /* ngx_http_conf_ctx_t, for example */
28 void *servers; /* array of ngx_http_in_addr_t, for example */
27 29
28 int backlog; 30 ngx_log_t *log;
29 time_t post_accept_timeout;
30 31
31 unsigned done:1; 32 int backlog;
32 unsigned inherited:1; 33 time_t post_accept_timeout; /* should be here because
33 unsigned nonblocking:1; 34 of the deferred accept */
35
36 unsigned bound:1; /* already bound */
37 unsigned inherited:1; /* inherited from previous process */
38 unsigned nonblocking:1;
34 #if 0 39 #if 0
35 unsigned overlapped:1; 40 unsigned overlapped:1; /* Winsock2 overlapped */
36 #endif 41 #endif
37 unsigned shared:1; /* shared between threads or processes */ 42 unsigned shared:1; /* shared between threads or processes */
38 #if (HAVE_DEFERRED_ACCEPT) 43 #if (HAVE_DEFERRED_ACCEPT)
39 unsigned deferred_accept:1; 44 unsigned deferred_accept:1;
40 #endif 45 #endif
41 } ngx_listen_t; 46 } ngx_listen_t;
42 47
43 48
49 extern ngx_array_t ngx_listening_sockets;
50
51
44 #endif /* _NGX_LISTEN_H_INCLUDED_ */ 52 #endif /* _NGX_LISTEN_H_INCLUDED_ */