comparison src/core/ngx_os_init.h @ 93:738fe44c70d5

nginx-0.0.1-2003-05-21-17:28:21 import
author Igor Sysoev <igor@sysoev.ru>
date Wed, 21 May 2003 13:28:21 +0000
parents 19cc647ecd91
children 7db96f59bc29
comparison
equal deleted inserted replaced
92:19cc647ecd91 93:738fe44c70d5
2 #define _NGX_OS_INIT_H_INCLUDED_ 2 #define _NGX_OS_INIT_H_INCLUDED_
3 3
4 4
5 #include <ngx_config.h> 5 #include <ngx_config.h>
6 #include <ngx_core.h> 6 #include <ngx_core.h>
7 #if 0 7
8 #include <ngx_connection.h> 8
9 #define NGX_IO_SENDFILE 1
10 #define NGX_IO_ZEROCOPY 2
11
12 #if (HAVE_SENDFILE)
13 #define NGX_HAVE_SENDFILE NGX_IO_SENDFILE
14 #else
15 #define NGX_HAVE_SENDFILE 0
9 #endif 16 #endif
17
18 #if (HAVE_ZEROCOPY)
19 #define NGX_HAVE_ZEROCOPY NGX_IO_ZEROCOPY
20 #else
21 #define NGX_HAVE_ZEROCOPY 0
22 #endif
23
10 24
11 25
12 typedef struct { 26 typedef struct {
13 ssize_t (*recv)(ngx_connection_t *c, char *buf, size_t size); 27 ssize_t (*recv)(ngx_connection_t *c, char *buf, size_t size);
14 void *dummy_recv_chain; 28 void *dummy_recv_chain;
15 void *dummy_send; 29 void *dummy_send;
16 ngx_chain_t *(*send_chain)(ngx_connection_t *c, ngx_chain_t *in); 30 ngx_chain_t *(*send_chain)(ngx_connection_t *c, ngx_chain_t *in);
31 int flags;
17 } ngx_os_io_t; 32 } ngx_os_io_t;
18 33
19 34
20 int ngx_os_init(ngx_log_t *log); 35 int ngx_os_init(ngx_log_t *log);
21 36
37
22 extern ngx_os_io_t ngx_os_io; 38 extern ngx_os_io_t ngx_os_io;
23 extern int ngx_max_sockets; 39 extern int ngx_max_sockets;
40 extern int ngx_inherited_nonblocking;
24 41
25 42
26 #endif /* _NGX_OS_INIT_H_INCLUDED_ */ 43 #endif /* _NGX_OS_INIT_H_INCLUDED_ */