diff options
author | dg <dg@FreeBSD.org> | 1998-04-28 03:37:23 +0000 |
---|---|---|
committer | dg <dg@FreeBSD.org> | 1998-04-28 03:37:23 +0000 |
commit | 3f47a3231dd1d0881fca5142e4131dadd6a8317b (patch) | |
tree | 834e2dee3262e6501ef5ea94d84cbbd96c73e914 /libexec/ftpd | |
parent | 7353226d849067a39d3ba63855a0c426201ca5e8 (diff) | |
download | FreeBSD-src-3f47a3231dd1d0881fca5142e4131dadd6a8317b.zip FreeBSD-src-3f47a3231dd1d0881fca5142e4131dadd6a8317b.tar.gz |
Set TCP_NODELAY on the control channel to improve performance a bit.
Diffstat (limited to 'libexec/ftpd')
-rw-r--r-- | libexec/ftpd/ftpd.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/libexec/ftpd/ftpd.c b/libexec/ftpd/ftpd.c index 7f40d6c..fca0ad9 100644 --- a/libexec/ftpd/ftpd.c +++ b/libexec/ftpd/ftpd.c @@ -44,7 +44,7 @@ static char copyright[] = static char sccsid[] = "@(#)ftpd.c 8.4 (Berkeley) 4/16/94"; #endif static const char rcsid[] = - "$Id: ftpd.c,v 1.44 1997/12/24 19:13:22 imp Exp $"; + "$Id: ftpd.c,v 1.45 1998/02/24 08:45:57 eivind Exp $"; #endif /* not lint */ /* @@ -480,6 +480,13 @@ main(argc, argv, envp) if (setsockopt(0, IPPROTO_IP, IP_TOS, (char *)&tos, sizeof(int)) < 0) syslog(LOG_WARNING, "setsockopt (IP_TOS): %m"); #endif + /* + * Disable Nagle on the control channel so that we don't have to wait + * for peer's ACK before issuing our next reply. + */ + if (setsockopt(0, IPPROTO_TCP, TCP_NODELAY, &on, sizeof(on)) < 0) + syslog(LOG_WARNING, "control setsockopt TCP_NODELAY: %m"); + data_source.sin_port = htons(ntohs(ctrl_addr.sin_port) - 1); /* set this here so klogin can use it... */ |