Commit dd3da439 authored by Jeremy Meng's avatar Jeremy Meng

Skip checking windows version on dnx.

parent 047bd569
...@@ -221,9 +221,9 @@ internal void SetFastLoopbackOption(Socket socket) ...@@ -221,9 +221,9 @@ internal void SetFastLoopbackOption(Socket socket)
// SIO_LOOPBACK_FAST_PATH (http://msdn.microsoft.com/en-us/library/windows/desktop/jj841212%28v=vs.85%29.aspx) // SIO_LOOPBACK_FAST_PATH (http://msdn.microsoft.com/en-us/library/windows/desktop/jj841212%28v=vs.85%29.aspx)
// Speeds up localhost operations significantly. OK to apply to a socket that will not be hooked up to localhost, // Speeds up localhost operations significantly. OK to apply to a socket that will not be hooked up to localhost,
// or will be subject to WFP filtering. // or will be subject to WFP filtering.
#if !DNXCORE50
const int SIO_LOOPBACK_FAST_PATH = -1744830448; const int SIO_LOOPBACK_FAST_PATH = -1744830448;
#if !DNXCORE50
// windows only // windows only
if (Environment.OSVersion.Platform == PlatformID.Win32NT) if (Environment.OSVersion.Platform == PlatformID.Win32NT)
{ {
...@@ -231,8 +231,11 @@ internal void SetFastLoopbackOption(Socket socket) ...@@ -231,8 +231,11 @@ internal void SetFastLoopbackOption(Socket socket)
var osVersion = Environment.OSVersion.Version; var osVersion = Environment.OSVersion.Version;
if (osVersion.Major > 6 || osVersion.Major == 6 && osVersion.Minor >= 2) if (osVersion.Major > 6 || osVersion.Major == 6 && osVersion.Minor >= 2)
{ {
#endif
byte[] optionInValue = BitConverter.GetBytes(1); byte[] optionInValue = BitConverter.GetBytes(1);
socket.IOControl(SIO_LOOPBACK_FAST_PATH, optionInValue, null); socket.IOControl(SIO_LOOPBACK_FAST_PATH, optionInValue, null);
#if !DNXCORE50
} }
} }
#endif #endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment