On Monday, October 12, 2015, Erich E. Hoover <<a href="mailto:erich.e.hoover@wine-staging.com">erich.e.hoover@wine-staging.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Mon, Oct 12, 2015 at 9:16 AM, Erich E. Hoover<br>
<<a href="javascript:;" onclick="_e(event, 'cvml', 'erich.e.hoover@wine-staging.com')">erich.e.hoover@wine-staging.com</a>> wrote:<br>
> On Mon, Oct 12, 2015 at 1:25 AM, Alexandre Julliard <<a href="javascript:;" onclick="_e(event, 'cvml', 'julliard@winehq.org')">julliard@winehq.org</a>> wrote:<br>
>> "Erich E. Hoover" <<a href="javascript:;" onclick="_e(event, 'cvml', 'erich.e.hoover@wine-staging.com')">erich.e.hoover@wine-staging.com</a>> writes:<br>
>><br>
>>> +    /* set reasonable defaults when requested */<br>
>>> +    if (!bytes_per_send)<br>
>>> +        bytes_per_send = 1024;<br>
>><br>
>> Is that the Windows default?  It doesn't seem very reasonable to me, it<br>
>> won't even fill a network packet.<br>
><br>
> I don't know, it's not in the documentation.  However, if you like I<br>
> could try to tease it out by doing some tests and running Wireshark on<br>
> it.  I figured that since the default MTU is 1500 bytes that 1024<br>
> would be a reasonable power of two less than that to use, but if you<br>
> think that 2^16 is more reasonable then, obviously, we could use that<br>
> instead.<br>
<br>
Some googling suggests that this value is controlled by<br>
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters\DefaultSendWindow<br>
and that the default is different depending on the Windows version.<br>
Apparently "normal" versions default to 64512 and server versions<br>
default to 655360.  How would you like this to be approached?</blockquote><div><br></div><div>Hi all. What about reading SO_SNDBUF where it is available and 1024 where it is not. Because I think send() will fail if you try to write more than the kernel buffer size.</div><div><br></div>