aboutsummaryrefslogtreecommitdiff
path: root/src/os/unix/ngx_socket.h
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2003-11-25 20:44:56 +0000
committerIgor Sysoev <igor@sysoev.ru>2003-11-25 20:44:56 +0000
commita8fa0a6a37b6e90324e0dcbf4733324199623841 (patch)
tree1a7edec9aa04946afc22299bf587823488fb492f /src/os/unix/ngx_socket.h
parentd9d0ca12688034d481e2f1f5cf13a098338ec31d (diff)
downloadnginx-a8fa0a6a37b6e90324e0dcbf4733324199623841.tar.gz
nginx-a8fa0a6a37b6e90324e0dcbf4733324199623841.zip
nginx-0.0.1-2003-11-25-23:44:56 import
Diffstat (limited to 'src/os/unix/ngx_socket.h')
-rw-r--r--src/os/unix/ngx_socket.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/os/unix/ngx_socket.h b/src/os/unix/ngx_socket.h
index 2a412d377..4e2eab441 100644
--- a/src/os/unix/ngx_socket.h
+++ b/src/os/unix/ngx_socket.h
@@ -29,11 +29,19 @@ int ngx_blocking(ngx_socket_t s);
#endif
int ngx_tcp_nopush(ngx_socket_t s);
-#define ngx_tcp_nopush_n "setsockopt(TCP_NOPUSH)"
-
int ngx_tcp_push(ngx_socket_t s);
+
+#ifdef __linux__
+
+#define ngx_tcp_nopush_n "setsockopt(TCP_CORK)"
+#define ngx_tcp_push_n "setsockopt(!TCP_CORK)"
+
+#else
+
+#define ngx_tcp_nopush_n "setsockopt(TCP_NOPUSH)"
#define ngx_tcp_push_n "setsockopt(!TCP_NOPUSH)"
+#endif
#define ngx_shutdown_socket shutdown