* net.cc (fdsock): Raise default SO_RCVBUF/SO_SNDBUF buffer sizes to
the same values as on Linux.
This commit is contained in:
parent
9dbb0bc355
commit
8ca521afe9
@ -1,3 +1,8 @@
|
|||||||
|
2006-04-04 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
|
* net.cc (fdsock): Raise default SO_RCVBUF/SO_SNDBUF buffer sizes to
|
||||||
|
the same values as on Linux.
|
||||||
|
|
||||||
2006-04-03 Christopher Faylor <cgf@timesys.com>
|
2006-04-03 Christopher Faylor <cgf@timesys.com>
|
||||||
|
|
||||||
* child_info.h (CURR_CHILD_INFO_MAGIC): Update.
|
* child_info.h (CURR_CHILD_INFO_MAGIC): Update.
|
||||||
|
@ -557,6 +557,15 @@ fdsock (cygheap_fdmanip& fd, const device *dev, SOCKET soc)
|
|||||||
fd->uninterruptible_io (true);
|
fd->uninterruptible_io (true);
|
||||||
cygheap->fdtab.inc_need_fixup_before ();
|
cygheap->fdtab.inc_need_fixup_before ();
|
||||||
debug_printf ("fd %d, name '%s', soc %p", (int) fd, dev->name, soc);
|
debug_printf ("fd %d, name '%s', soc %p", (int) fd, dev->name, soc);
|
||||||
|
|
||||||
|
/* Same default buffer sizes as on Linux (instead of WinSock default 8K). */
|
||||||
|
int rmem = dev == tcp_dev ? 87380 : 120832;
|
||||||
|
int wmem = dev == tcp_dev ? 16384 : 120832;
|
||||||
|
if (::setsockopt (soc, SOL_SOCKET, SO_RCVBUF, (char *) &rmem, sizeof (int)))
|
||||||
|
debug_printf ("setsockopt(SO_RCVBUF) failed, %lu", WSAGetLastError ());
|
||||||
|
if (::setsockopt (soc, SOL_SOCKET, SO_SNDBUF, (char *) &wmem, sizeof (int)))
|
||||||
|
debug_printf ("setsockopt(SO_SNDBUF) failed, %lu", WSAGetLastError ());
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user