Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ Get() [1/2]

static int System.Net.Sockets.IOControlKeepAlive.Get ( SafeSocketHandle handle,
SocketOptionName optionName )
inlinestatic

Definition at line 30 of file IOControlKeepAlive.cs.

31 {
32 if (s_socketKeepAliveTable.TryGetValue(handle, out var value))
33 {
34 if (optionName != SocketOptionName.TypeOfService)
35 {
36 return MillisecondsToSeconds(value._intervalMs);
37 }
38 return MillisecondsToSeconds(value._timeMs);
39 }
40 if (optionName != SocketOptionName.TypeOfService)
41 {
42 return MillisecondsToSeconds(1000u);
43 }
44 return MillisecondsToSeconds(7200000u);
45 }
static readonly ConditionalWeakTable< SafeSocketHandle, IOControlKeepAlive > s_socketKeepAliveTable
static int MillisecondsToSeconds(uint milliseconds)

References System.handle, System.Net.Sockets.IOControlKeepAlive.MillisecondsToSeconds(), System.Net.Sockets.IOControlKeepAlive.s_socketKeepAliveTable, and System.value.