Terraria
v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
SystemTcpConnectionInformation.cs
Go to the documentation of this file.
1
namespace
System.Net.NetworkInformation
;
2
3
internal
sealed
class
SystemTcpConnectionInformation
:
TcpConnectionInformation
4
{
5
private
readonly
IPEndPoint
_localEndPoint
;
6
7
private
readonly
IPEndPoint
_remoteEndPoint
;
8
9
private
readonly
TcpState
_state
;
10
11
public
override
TcpState
State =>
_state
;
12
13
public
override
IPEndPoint
LocalEndPoint
=>
_localEndPoint
;
14
15
public
override
IPEndPoint
RemoteEndPoint
=>
_remoteEndPoint
;
16
17
internal
SystemTcpConnectionInformation
(in global::Interop.IpHlpApi.MibTcpRow row)
18
{
19
_state
= row.state;
20
int
port = (row.localPort1 << 8) | row.localPort2;
21
int
port2 = ((
_state
!=
TcpState
.Listen) ? ((row.remotePort1 << 8) | row.remotePort2) : 0);
22
_localEndPoint
=
new
IPEndPoint
(row.localAddr, port);
23
_remoteEndPoint
=
new
IPEndPoint
(row.remoteAddr, port2);
24
}
25
26
internal
SystemTcpConnectionInformation
(in global::Interop.IpHlpApi.MibTcp6RowOwnerPid row)
27
{
28
_state
= row.state;
29
int
port = (row.localPort1 << 8) | row.localPort2;
30
int
port2 = ((
_state
!=
TcpState
.Listen) ? ((row.remotePort1 << 8) | row.remotePort2) : 0);
31
_localEndPoint
=
new
IPEndPoint
(
new
IPAddress
(row.localAddrAsSpan, row.localScopeId), port);
32
_remoteEndPoint
=
new
IPEndPoint
(
new
IPAddress
(row.remoteAddrAsSpan, row.remoteScopeId), port2);
33
}
34
}
System.Net.IPAddress
Definition
IPAddress.cs:10
System.Net.IPEndPoint
Definition
IPEndPoint.cs:8
System.Net.NetworkInformation.SystemTcpConnectionInformation.SystemTcpConnectionInformation
SystemTcpConnectionInformation(in global::Interop.IpHlpApi.MibTcpRow row)
Definition
SystemTcpConnectionInformation.cs:17
System.Net.NetworkInformation.SystemTcpConnectionInformation._localEndPoint
readonly IPEndPoint _localEndPoint
Definition
SystemTcpConnectionInformation.cs:5
System.Net.NetworkInformation.SystemTcpConnectionInformation._state
readonly TcpState _state
Definition
SystemTcpConnectionInformation.cs:9
System.Net.NetworkInformation.SystemTcpConnectionInformation._remoteEndPoint
readonly IPEndPoint _remoteEndPoint
Definition
SystemTcpConnectionInformation.cs:7
System.Net.NetworkInformation.SystemTcpConnectionInformation.RemoteEndPoint
override IPEndPoint RemoteEndPoint
Definition
SystemTcpConnectionInformation.cs:15
System.Net.NetworkInformation.SystemTcpConnectionInformation.LocalEndPoint
override IPEndPoint LocalEndPoint
Definition
SystemTcpConnectionInformation.cs:13
System.Net.NetworkInformation.SystemTcpConnectionInformation.SystemTcpConnectionInformation
SystemTcpConnectionInformation(in global::Interop.IpHlpApi.MibTcp6RowOwnerPid row)
Definition
SystemTcpConnectionInformation.cs:26
System.Net.NetworkInformation.SystemTcpConnectionInformation
Definition
SystemTcpConnectionInformation.cs:4
System.Net.NetworkInformation.TcpConnectionInformation
Definition
TcpConnectionInformation.cs:4
System.Net.NetworkInformation.TcpState
TcpState
Definition
TcpState.cs:4
System.Net.NetworkInformation
Definition
DuplicateAddressDetectionState.cs:1
source
System.Net.NetworkInformation
System.Net.NetworkInformation
SystemTcpConnectionInformation.cs
Generated by
1.10.0