Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
IPEndPointExtensions.cs
Go to the documentation of this file.
2
3namespace System.Net.Sockets;
4
5internal static class IPEndPointExtensions
6{
8 {
9 if (endpoint is IPEndPoint iPEndPoint)
10 {
11 return new System.Net.Internals.SocketAddress(iPEndPoint.Address, iPEndPoint.Port);
12 }
13 SocketAddress address = endpoint.Serialize();
14 return GetInternalSocketAddress(address);
15 }
16
18 {
20 for (int i = 0; i < address.Size; i++)
21 {
22 socketAddress[i] = address[i];
23 }
24 return socketAddress;
25 }
26}
virtual SocketAddress Serialize()
Definition EndPoint.cs:15
static System.Net.Internals.SocketAddress GetInternalSocketAddress(SocketAddress address)
static System.Net.Internals.SocketAddress Serialize(EndPoint endpoint)