Mercurial > hg > nginx
comparison src/os/unix/ngx_socket.h @ 101:2e069b6e6920
nginx-0.0.1-2003-06-04-21:28:33 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Wed, 04 Jun 2003 17:28:33 +0000 |
parents | 738fe44c70d5 |
children | 8dee38ea9117 |
comparison
equal
deleted
inserted
replaced
100:7ebc8b7fb816 | 101:2e069b6e6920 |
---|---|
11 | 11 |
12 #define ngx_socket(af, type, proto, flags) socket(af, type, proto) | 12 #define ngx_socket(af, type, proto, flags) socket(af, type, proto) |
13 #define ngx_socket_n "socket()" | 13 #define ngx_socket_n "socket()" |
14 | 14 |
15 | 15 |
16 #if 1 | 16 #if (HAVE_FIONBIO) |
17 | 17 |
18 int ngx_nonblocking(ngx_socket_t s); | 18 int ngx_nonblocking(ngx_socket_t s); |
19 int ngx_blocking(ngx_socket_t s); | 19 int ngx_blocking(ngx_socket_t s); |
20 | 20 |
21 #define ngx_nonblocking_n "ioctl(FIONBIO)" | 21 #define ngx_nonblocking_n "ioctl(FIONBIO)" |
26 #define ngx_nonblocking(s) fcntl(s, F_SETFL, O_NONBLOCK) | 26 #define ngx_nonblocking(s) fcntl(s, F_SETFL, O_NONBLOCK) |
27 #define ngx_nonblocking_n "fcntl(O_NONBLOCK)" | 27 #define ngx_nonblocking_n "fcntl(O_NONBLOCK)" |
28 | 28 |
29 #endif | 29 #endif |
30 | 30 |
31 int ngx_tcp_nopush(ngx_socket_t s); | |
32 #define ngx_tcp_nopush_n "setsockopt(TCP_NOPUSH)" | |
33 | |
34 int ngx_tcp_push(ngx_socket_t s); | |
35 #define ngx_tcp_push_n "setsockopt(!TCP_NOPUSH)" | |
36 | |
37 | |
31 | 38 |
32 #define ngx_shutdown_socket shutdown | 39 #define ngx_shutdown_socket shutdown |
33 #define ngx_shutdown_socket_n "shutdown()" | 40 #define ngx_shutdown_socket_n "shutdown()" |
34 | 41 |
35 #define ngx_close_socket close | 42 #define ngx_close_socket close |