Change the following using the Windows Registry editor:
# turn on window scale and timestamp option
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Tcp1323=3
# set default TCP window size (default = 16KB)
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\TcpWindowSize=131400
# and maybe set this too: (default = not set )
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\GlobalMaxTcpWindowSize=16777216
The default for Tcp1323 is
"No value"; the default behavior is do not initiate options, but if requested provide them.
You can use setsockopt() in your program to set your buffers to any size up to GlobalMaxTcpWindowSize,
or you can use TcpWindowSize to set the default send and receive buffers for ALL sockets to this size.
Its probably not a good idea to set this too large, but setting it up to 128K should be OK.
More information is available in the following Microsoft Documents:
TCP Configuration Parameters
TCP/IP Implementation Details
This article may also be useful:
Windows 2000/XP Registry Tweaks