Change default socket buffer size under Windows

2019-01-09 13:01发布

问题:

An application I cannot change is dropping some incoming UDP packets. I suspect that the receive buffer is overflowing. Is there a registry setting to make the default buffer larger than 8KB?

回答1:

From this To set the default size of the Windows use the following DWORD registry keys :

[HKEY_LOCAL_MACHINE \SYSTEM \CurrentControlSet\Services\Afd\Parameters]

DefaultReceiveWindow = 10240
DefaultSendWindow = 10240