comparison src/os/unix/ngx_socket.c @ 50:72eb30262aac NGINX_0_1_25

nginx 0.1.25 *) Bugfix: nginx did run on Linux parisc. *) Feature: nginx now does not start under FreeBSD if the sysctl kern.ipc.somaxconn value is too big. *) Bugfix: if a request was internally redirected by the ngx_http_index_module module to the ngx_http_proxy_module or ngx_http_fastcgi_module modules, then the index file was not closed after request completion. *) Feature: the "proxy_pass" can be used in location with regular expression. *) Feature: the ngx_http_rewrite_filter_module module supports the condition like "if ($HTTP_USER_AGENT ~ MSIE)". *) Bugfix: nginx started too slow if the large number of addresses and text values were used in the "geo" directive. *) Change: a variable name must be declared as "$name" in the "geo" directive. The previous variant without "$" is still supported, but will be removed soon. *) Feature: the "%{VARIABLE}v" logging parameter. *) Feature: the "set $name value" directive. *) Bugfix: gcc 4.0 compatibility. *) Feature: the --with-openssl-opt=OPTIONS autoconfiguration directive.
author Igor Sysoev <http://sysoev.ru>
date Sat, 19 Mar 2005 00:00:00 +0300
parents 6f8b0dc0f8dd
children 408f195b3482
comparison
equal deleted inserted replaced
49:93dabbc9efb9 50:72eb30262aac
20 */ 20 */
21 21
22 22
23 #if (NGX_HAVE_FIONBIO) 23 #if (NGX_HAVE_FIONBIO)
24 24
25 int ngx_nonblocking(ngx_socket_t s) 25 int
26 ngx_nonblocking(ngx_socket_t s)
26 { 27 {
27 u_long nb; 28 u_long nb;
28 29
29 nb = 1; 30 nb = 1;
30 31
31 return ioctl(s, FIONBIO, &nb); 32 return ioctl(s, FIONBIO, &nb);
32 } 33 }
33 34
34 35
35 int ngx_blocking(ngx_socket_t s) 36 int
37 ngx_blocking(ngx_socket_t s)
36 { 38 {
37 u_long nb; 39 u_long nb;
38 40
39 nb = 0; 41 nb = 0;
40 42
44 #endif 46 #endif
45 47
46 48
47 #if (NGX_FREEBSD) 49 #if (NGX_FREEBSD)
48 50
49 int ngx_tcp_nopush(ngx_socket_t s) 51 int
52 ngx_tcp_nopush(ngx_socket_t s)
50 { 53 {
51 int tcp_nopush; 54 int tcp_nopush;
52 55
53 tcp_nopush = 1; 56 tcp_nopush = 1;
54 57
55 return setsockopt(s, IPPROTO_TCP, TCP_NOPUSH, 58 return setsockopt(s, IPPROTO_TCP, TCP_NOPUSH,
56 (const void *) &tcp_nopush, sizeof(int)); 59 (const void *) &tcp_nopush, sizeof(int));
57 } 60 }
58 61
59 62
60 int ngx_tcp_push(ngx_socket_t s) 63 int
64 ngx_tcp_push(ngx_socket_t s)
61 { 65 {
62 int tcp_nopush; 66 int tcp_nopush;
63 67
64 tcp_nopush = 0; 68 tcp_nopush = 0;
65 69
67 (const void *) &tcp_nopush, sizeof(int)); 71 (const void *) &tcp_nopush, sizeof(int));
68 } 72 }
69 73
70 #elif (NGX_LINUX) 74 #elif (NGX_LINUX)
71 75
72 int ngx_tcp_nopush(ngx_socket_t s) 76 int
77 ngx_tcp_nopush(ngx_socket_t s)
73 { 78 {
74 int cork; 79 int cork;
75 80
76 cork = 1; 81 cork = 1;
77 82
78 return setsockopt(s, IPPROTO_TCP, TCP_CORK, 83 return setsockopt(s, IPPROTO_TCP, TCP_CORK,
79 (const void *) &cork, sizeof(int)); 84 (const void *) &cork, sizeof(int));
80 } 85 }
81 86
82 int ngx_tcp_push(ngx_socket_t s) 87 int
88 ngx_tcp_push(ngx_socket_t s)
83 { 89 {
84 int cork; 90 int cork;
85 91
86 cork = 0; 92 cork = 0;
87 93
89 (const void *) &cork, sizeof(int)); 95 (const void *) &cork, sizeof(int));
90 } 96 }
91 97
92 #else 98 #else
93 99
94 int ngx_tcp_nopush(ngx_socket_t s) 100 int
101 ngx_tcp_nopush(ngx_socket_t s)
95 { 102 {
96 return NGX_OK; 103 return 0;
97 } 104 }
98 105
99 int ngx_tcp_push(ngx_socket_t s) 106 int
107 ngx_tcp_push(ngx_socket_t s)
100 { 108 {
101 return NGX_OK; 109 return 0;
102 } 110 }
103 111
104 #endif 112 #endif