diff options
author | ths <ths@c046a42c-6fe2-441c-8c8c-71466251a162> | 2006-12-21 19:10:59 +0000 |
---|---|---|
committer | ths <ths@c046a42c-6fe2-441c-8c8c-71466251a162> | 2006-12-21 19:10:59 +0000 |
commit | eaf7e70b014464294ce9622dc47b0f17a099fbb7 (patch) | |
tree | 2ec74ac844fb2cd4226de2471c061aaff0452055 | |
parent | 8bdc2159db1dc9eec69652a74fb503c0a1953bc2 (diff) |
Enable TCP_NODELAY, by Daniel Jacobowitz.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2257 c046a42c-6fe2-441c-8c8c-71466251a162
-rw-r--r-- | slirp/tcp.h | 2 | ||||
-rw-r--r-- | slirp/tcp_subr.c | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/slirp/tcp.h b/slirp/tcp.h index cd7e89110a..0cd3ab3a49 100644 --- a/slirp/tcp.h +++ b/slirp/tcp.h @@ -112,7 +112,7 @@ struct tcphdr { /* * User-settable options (used with setsockopt). */ -/* #define TCP_NODELAY 0x01 */ /* don't delay send to coalesce packets */ +#define TCP_NODELAY 0x01 /* don't delay send to coalesce packets */ /* #define TCP_MAXSEG 0x02 */ /* set maximum segment size */ /* diff --git a/slirp/tcp_subr.c b/slirp/tcp_subr.c index e66987eeae..2526bffc60 100644 --- a/slirp/tcp_subr.c +++ b/slirp/tcp_subr.c @@ -499,6 +499,8 @@ tcp_connect(inso) setsockopt(s,SOL_SOCKET,SO_REUSEADDR,(char *)&opt,sizeof(int)); opt = 1; setsockopt(s,SOL_SOCKET,SO_OOBINLINE,(char *)&opt,sizeof(int)); + opt = 1; + setsockopt(s,IPPROTO_TCP,TCP_NODELAY,(char *)&opt,sizeof(int)); so->so_fport = addr.sin_port; so->so_faddr = addr.sin_addr; |