Terraria
v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
CompletionPortHelper.cs
Go to the documentation of this file.
1
using
System.Runtime.InteropServices
;
2
3
namespace
System.Net.Sockets
;
4
5
internal
static
class
CompletionPortHelper
6
{
7
internal
static
readonly
bool
PlatformHasUdpIssue
=
CheckIfPlatformHasUdpIssue
();
8
9
internal
static
bool
SkipCompletionPortOnSuccess
(
SafeHandle
handle
)
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
}
System.Environment.OSVersion
static OperatingSystem OSVersion
Definition
Environment.cs:205
System.Environment
Definition
Environment.cs:15
System.Net.Sockets.CompletionPortHelper.PlatformHasUdpIssue
static readonly bool PlatformHasUdpIssue
Definition
CompletionPortHelper.cs:7
System.Net.Sockets.CompletionPortHelper.SkipCompletionPortOnSuccess
static bool SkipCompletionPortOnSuccess(SafeHandle handle)
Definition
CompletionPortHelper.cs:9
System.Net.Sockets.CompletionPortHelper.CheckIfPlatformHasUdpIssue
static bool CheckIfPlatformHasUdpIssue()
Definition
CompletionPortHelper.cs:14
System.Net.Sockets.CompletionPortHelper
Definition
CompletionPortHelper.cs:6
System.Runtime.InteropServices.SafeHandle
Definition
SafeHandle.cs:7
System.Version.Major
int Major
Definition
Version.cs:19
System.Version
Definition
Version.cs:10
System.Net.Sockets
Definition
AddressInfoHints.cs:1
System.Runtime.InteropServices
Definition
SequenceMarshal.cs:4
System.ExceptionArgument.handle
@ handle
source
System.Net.Sockets
System.Net.Sockets
CompletionPortHelper.cs
Generated by
1.10.0