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

Erich E. Hoover erich.e.hoover at wine-staging.com
Mon Oct 12 17:47:44 CDT 2015


This patch adds support for the basic file-transfer operation of
TransmitFile.  It reads the file in as "bytes_per_send" chunks, which
it then sends to the destination using WS2_send.  This process is
repeated synchronously (until patch 5 adds async support) until the
entire file is sent.

I found some more information with some careful googling, so this
version has been updated with a more reasonable default value for
"bytes_per_send" based on the documentation in MSDN's Windows Sockets
Appendix C ( https://technet.microsoft.com/en-us/library/cc781532%28v=ws.10%29.aspx).
Depending on the version of the OS the default value can be one of
PAGE_SIZE (4096 on i386), 2*PAGE_SIZE, or 2^16.  The patch uses 2^16,
since this is the largest of these values, does not require querying
the page size, and it is not so large that it would pose a problem.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-ws2_32-Implement-a-basic-synchronous-TransmitFile.patch
Type: application/x-download
Size: 10080 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20151012/54544f53/attachment.bin>


More information about the wine-patches mailing list