Skip to content

Commit

Permalink
The SIO_TCP_SET_ACK_FREQUENCY flag seems to be supported only on Wind…
Browse files Browse the repository at this point in the history
…ows 10 Build 15063 and higher.

See dotnet/runtime#798
  • Loading branch information
kpreisser committed Jun 2, 2021
1 parent 702fcf4 commit fda4340
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion SimpleSocketClient/SocketConfigurator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ private static void DisableTcpDelayedAck(Socket socket)
// into a future .NET version.
// Note: On Debian-based Linux OSes, it seems TCP_QUICKACK is already enabled
// by default (according to the man page of socket_quickack(3).
if (socket.ProtocolType == ProtocolType.Tcp && OperatingSystem.IsWindows())
// Note: On Windows, the SIO_TCP_SET_ACK_FREQUENCY seems to be supported only
// on Windows 10 Build 15063 and higher; on ealier Windows versions it causes
// the connection to fail.
if (socket.ProtocolType == ProtocolType.Tcp && OperatingSystem.IsWindowsVersionAtLeast(10, 0, 15063))
{
try
{
Expand Down

0 comments on commit fda4340

Please sign in to comment.