Commit eaf7e70b authored by ths's avatar ths

Enable TCP_NODELAY, by Daniel Jacobowitz.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2257 c046a42c-6fe2-441c-8c8c-71466251a162
parent 8bdc2159
......@@ -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 */
/*
......
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment