Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
CompletionPortHelper.cs
Go to the documentation of this file.
2
3namespace System.Net.Sockets;
4
5internal static class CompletionPortHelper
6{
7 internal static readonly bool PlatformHasUdpIssue = CheckIfPlatformHasUdpIssue();
8
10 {
11 return global::Interop.Kernel32.SetFileCompletionNotificationModes(handle, global::Interop.Kernel32.FileCompletionNotificationModes.SkipCompletionPortOnSuccess | global::Interop.Kernel32.FileCompletionNotificationModes.SkipSetEventOnHandle);
12 }
13
14 private static bool CheckIfPlatformHasUdpIssue()
15 {
16 Version version = Environment.OSVersion.Version;
17 if (version.Major >= 6)
18 {
19 if (version.Major == 6)
20 {
21 return version.Minor <= 1;
22 }
23 return false;
24 }
25 return true;
26 }
27}
static OperatingSystem OSVersion
static bool SkipCompletionPortOnSuccess(SafeHandle handle)