diff options
author | Igor Sysoev <igor@sysoev.ru> | 2003-11-30 20:03:18 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2003-11-30 20:03:18 +0000 |
commit | 865c150cb473fca8ff91d60ddd539ac6dbbe02ee (patch) | |
tree | 1ae51b35fbfaa069adf98db8a4c98887bdd3f9a8 /src/os/unix | |
parent | c2bba092eb07ea5fcd2e2ee987e3a304f755a3c7 (diff) | |
download | nginx-865c150cb473fca8ff91d60ddd539ac6dbbe02ee.tar.gz nginx-865c150cb473fca8ff91d60ddd539ac6dbbe02ee.zip |
nginx-0.0.1-2003-11-30-23:03:18 import
Diffstat (limited to 'src/os/unix')
-rw-r--r-- | src/os/unix/ngx_freebsd_sendfile_chain.c | 18 | ||||
-rw-r--r-- | src/os/unix/ngx_linux_sendfile_chain.c | 7 |
2 files changed, 12 insertions, 13 deletions
diff --git a/src/os/unix/ngx_freebsd_sendfile_chain.c b/src/os/unix/ngx_freebsd_sendfile_chain.c index bb89336fe..e76f4c6f4 100644 --- a/src/os/unix/ngx_freebsd_sendfile_chain.c +++ b/src/os/unix/ngx_freebsd_sendfile_chain.c @@ -5,16 +5,16 @@ /* - * sendfile() often sends 4K pages over ethernet in 3 packets: 2x1460 and 1176 - * or in 6 packets: 5x1460 and 892. Besides although sendfile() allows - * to pass the header and the trailer it never sends the header or the trailer - * with the part of the file in one packet. So we use TCP_NOPUSH (similar - * to Linux's TCP_CORK) to postpone the sending - it not only sends the header - * and the first part of the file in one packet but also sends 4K pages - * in the full packets. + * FreeBSD's sendfile() often sends 4K pages over ethernet in 3 packets: 2x1460 + * and 1176 or in 6 packets: 5x1460 and 892. Besides although sendfile() + * allows to pass the header and the trailer it never sends the header or + * the trailer with the part of the file in one packet. So we use TCP_NOPUSH + * (similar to Linux's TCP_CORK) to postpone the sending - it not only sends + * the header and the first part of the file in one packet but also sends + * 4K pages in the full packets. * - * Until FreeBSD 4.5 the turning TCP_NOPUSH off does not flush the pending - * data that less than MSS so the data can be sent with 5 second delay. + * Until FreeBSD 4.5 the turning TCP_NOPUSH off does not flush a pending + * data that less than MSS so that data can be sent with 5 second delay. * We do not use TCP_NOPUSH on FreeBSD prior to 4.5 although it can be used * for non-keepalive HTTP connections. */ diff --git a/src/os/unix/ngx_linux_sendfile_chain.c b/src/os/unix/ngx_linux_sendfile_chain.c index d96d93df7..d4e45bbe4 100644 --- a/src/os/unix/ngx_linux_sendfile_chain.c +++ b/src/os/unix/ngx_linux_sendfile_chain.c @@ -6,10 +6,9 @@ /* * On Linux up to 2.4.21 sendfile() (syscall #187) works with 32-bit - * offsets only and the including <sys/sendfile.h> breaks building - * if off_t is 64 bit wide. So we use own sendfile() definition where - * offset paramter is int32_t. It allows to use sendfile() with - * the file parts below 2G. + * offsets only and the including <sys/sendfile.h> breaks building if + * off_t is 64 bit wide. So we use own sendfile() definition where offset + * parameter is int32_t and use sendfile() with the file parts below 2G. * * Linux 2.4.21 has a new sendfile64() syscall #239. */ |