[PATCH 1/3] ws2_32: Implement a basic synchronous TransmitFile (try 3).

Erich E. Hoover erich.e.hoover at wine-staging.com
Mon Oct 12 21:30:56 CDT 2015

On Mon, Oct 12, 2015 at 8:03 PM, Bruno Jesus <00cpxxx at 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):

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.


More information about the wine-devel mailing list