Max Reommended buffer size to send using (nonblocking) WSASend
Posted on 2005-04-17
My server (C++ , MSVC6) using completion-port to send huge data-buffers
to the client .
till now, i was using a single call to WSASend() to send ALL the data
(single buffer , can be 10MB-100MB ) .
I noticed that if i'm using buffer-size to be ~60MB and above , the
WSASend returns error about the size .
my question is - what is the maximum buffer size that it's recommended
to send ?
As much as i understand, if i'm sending "big" buffers , the NDIS/TDI
(or other O.S component) can split them into smaller buffers so the
TCP/IP will send 8K each time , right ? so it's better to fill-up the
"lower-layer" with the maximum buffer size that it can handle .
In another words - most implementations send 8KB-16KB because this is
the "send buffer" size, but it means that the O.S will be waiting for
new buffers , maybe it's better to send 1MB just to prevent this "O.S
Am i right ? any ideas ?