What is an optimal size of buffer to send large file(>30Mb) over network?

There is a parameter - TCP Window Size. For example we have scale window size about 128Kb. If I'll use small buffer about 32Kb, and several send or WSASend methods, these data segments(32 Kb) will be sent inside one TCP Window or more than one?


There is a way to give all to the system with help's of TransmitFile. But there is a question: how much memory does TransmitFile occupy per one send-operation?