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

◆ UnixDomainSocketEndPoint() [3/3]

System.Net.Sockets.UnixDomainSocketEndPoint.UnixDomainSocketEndPoint ( SocketAddress socketAddress)
inlinepackage

Definition at line 55 of file UnixDomainSocketEndPoint.cs.

56 {
57 if (socketAddress == null)
58 {
59 throw new ArgumentNullException("socketAddress");
60 }
61 if (socketAddress.Family != AddressFamily.Unix || socketAddress.Size > s_nativeAddressSize)
62 {
63 throw new ArgumentOutOfRangeException("socketAddress");
64 }
65 if (socketAddress.Size > s_nativePathOffset)
66 {
67 _encodedPath = new byte[socketAddress.Size - s_nativePathOffset];
68 for (int i = 0; i < _encodedPath.Length; i++)
69 {
70 _encodedPath[i] = socketAddress[s_nativePathOffset + i];
71 }
72 int num = _encodedPath.Length;
74 {
75 while (_encodedPath[num - 1] == 0)
76 {
77 num--;
78 }
79 }
80 _path = Encoding.UTF8.GetString(_encodedPath, 0, num);
81 }
82 else
83 {
84 _encodedPath = Array.Empty<byte>();
85 _path = string.Empty;
86 }
87 }
static Encoding UTF8
Definition Encoding.cs:526

References System.Net.Sockets.UnixDomainSocketEndPoint._encodedPath, System.Net.Sockets.UnixDomainSocketEndPoint._path, System.Net.SocketAddress.Family, System.Net.Sockets.UnixDomainSocketEndPoint.IsAbstract(), System.Net.Sockets.UnixDomainSocketEndPoint.s_nativeAddressSize, System.Net.Sockets.UnixDomainSocketEndPoint.s_nativePathOffset, System.Net.SocketAddress.Size, and System.Text.Encoding.UTF8.