turn off Nagle

This commit is contained in:
dborth 2010-06-27 00:42:17 +00:00
parent b7881bfa72
commit 7b9772cec9

View File

@ -38,10 +38,14 @@ static s32 tcp_socket(void)
{
s32 s, res;
s = net_socket(PF_INET, SOCK_STREAM, 0);
s = net_socket(PF_INET, SOCK_STREAM, IPPROTO_IP);
if (s < 0)
return s;
// Switch off Nagle with TCP_NODELAY
u32 nodelay = 1;
net_setsockopt(s,IPPROTO_TCP,TCP_NODELAY,&nodelay,sizeof(nodelay));
res = net_fcntl(s, F_GETFL, 0);
if (res < 0)
{