"Erich E. Hoover" erich.e.hoover@wine-staging.com writes:
- /* set reasonable defaults when requested */
- if (!bytes_per_send)
bytes_per_send = 1024;
Is that the Windows default? It doesn't seem very reasonable to me, it won't even fill a network packet.
On Mon, Oct 12, 2015 at 1:25 AM, Alexandre Julliard julliard@winehq.org wrote:
"Erich E. Hoover" erich.e.hoover@wine-staging.com writes:
- /* set reasonable defaults when requested */
- if (!bytes_per_send)
bytes_per_send = 1024;
Is that the Windows default? It doesn't seem very reasonable to me, it won't even fill a network packet.
I don't know, it's not in the documentation. However, if you like I could try to tease it out by doing some tests and running Wireshark on it. I figured that since the default MTU is 1500 bytes that 1024 would be a reasonable power of two less than that to use, but if you think that 2^16 is more reasonable then, obviously, we could use that instead.
Best, Erich
On Mon, Oct 12, 2015 at 9:16 AM, Erich E. Hoover erich.e.hoover@wine-staging.com wrote:
On Mon, Oct 12, 2015 at 1:25 AM, Alexandre Julliard julliard@winehq.org wrote:
"Erich E. Hoover" erich.e.hoover@wine-staging.com writes:
- /* set reasonable defaults when requested */
- if (!bytes_per_send)
bytes_per_send = 1024;
Is that the Windows default? It doesn't seem very reasonable to me, it won't even fill a network packet.
I don't know, it's not in the documentation. However, if you like I could try to tease it out by doing some tests and running Wireshark on it. I figured that since the default MTU is 1500 bytes that 1024 would be a reasonable power of two less than that to use, but if you think that 2^16 is more reasonable then, obviously, we could use that instead.
Some googling suggests that this value is controlled by HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters\DefaultSendWindow and that the default is different depending on the Windows version. Apparently "normal" versions default to 64512 and server versions default to 655360. How would you like this to be approached?
Best, Erich
On Monday, October 12, 2015, Erich E. Hoover < erich.e.hoover@wine-staging.com> wrote:
On Mon, Oct 12, 2015 at 9:16 AM, Erich E. Hoover <erich.e.hoover@wine-staging.com javascript:;> wrote:
On Mon, Oct 12, 2015 at 1:25 AM, Alexandre Julliard <julliard@winehq.org
javascript:;> wrote:
"Erich E. Hoover" <erich.e.hoover@wine-staging.com javascript:;>
writes:
- /* set reasonable defaults when requested */
- if (!bytes_per_send)
bytes_per_send = 1024;
Is that the Windows default? It doesn't seem very reasonable to me, it won't even fill a network packet.
I don't know, it's not in the documentation. However, if you like I could try to tease it out by doing some tests and running Wireshark on it. I figured that since the default MTU is 1500 bytes that 1024 would be a reasonable power of two less than that to use, but if you think that 2^16 is more reasonable then, obviously, we could use that instead.
Some googling suggests that this value is controlled by
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AFD\Parameters\DefaultSendWindow and that the default is different depending on the Windows version. Apparently "normal" versions default to 64512 and server versions default to 655360. How would you like this to be approached?
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.
On Mon, Oct 12, 2015 at 8:03 PM, Bruno Jesus 00cpxxx@gmail.com wrote:
... 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.
I found some more useful information on what TransmitFile it supposed to do (2^16 is a sane default): http://source.winehq.org/patches/data/115187
We could consider using the SO_SNDBUF size, but how we treat it would need to be platform dependent. On Linux you need to divide the value by 2 and on BSD it's the value it says it is - I'm not sure about other platforms. It might make sense to go to the trouble to do this, but I'm not sure it's worth worrying about. We could go back to 1024 (the minimum permitted value for the "real" SO_SNDBUF size), though, as AJ points out, that value is quite small. Since the "real" default on Linux systems is 2^16 (2*2^16 reported) or larger I think we just go with the 2^16 value from MSDN.
Best, Erich