comparison src/os/unix/ngx_freebsd_sendfile_chain.c @ 103:6dfda4cf5200

nginx-0.0.1-2003-06-11-19:28:34 import
author Igor Sysoev <igor@sysoev.ru>
date Wed, 11 Jun 2003 15:28:34 +0000
parents 2e069b6e6920
children cb77c084acdb
comparison
equal deleted inserted replaced
102:7e86d028d8f0 103:6dfda4cf5200
13 and the first part of the file in one packet but also sends 4K pages 13 and the first part of the file in one packet but also sends 4K pages
14 in the full packets. 14 in the full packets.
15 15
16 Until FreeBSD 4.5 the turning TCP_NOPUSH off does not not flush 16 Until FreeBSD 4.5 the turning TCP_NOPUSH off does not not flush
17 the pending data that less than MSS and the data sent with 5 second delay. 17 the pending data that less than MSS and the data sent with 5 second delay.
18 So we use TCP_NOPUSH on FreeBSD 4.5+ only. 18 So we use TCP_NOPUSH on FreeBSD prior to 4.5 only if the connection
19 is not needed not keepalive.
19 */ 20 */
20 21
21 22
22 ngx_chain_t *ngx_freebsd_sendfile_chain(ngx_connection_t *c, ngx_chain_t *in) 23 ngx_chain_t *ngx_freebsd_sendfile_chain(ngx_connection_t *c, ngx_chain_t *in)
23 { 24 {
24 int rc, eintr, tcp_nopush; 25 int rc, eintr, tcp_nopush;
25 char *prev; 26 char *prev;
26 size_t hsize, size; 27 ssize_t hsize, size;
27 off_t sent; 28 off_t sent;
28 struct iovec *iov; 29 struct iovec *iov;
29 struct sf_hdtr hdtr; 30 struct sf_hdtr hdtr;
30 ngx_err_t err; 31 ngx_err_t err;
31 ngx_array_t header, trailer; 32 ngx_array_t header, trailer;