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;