Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
SocketAddressPal.cs
Go to the documentation of this file.
3
4namespace System.Net;
5
6internal static class SocketAddressPal
7{
12
13 public static void SetAddressFamily(byte[] buffer, AddressFamily family)
14 {
15 if (family > (AddressFamily)65535)
16 {
18 }
20 }
21
22 public static void SetPort(byte[] buffer, ushort port)
23 {
25 }
26
27 public static void SetIPv4Address(byte[] buffer, uint address)
28 {
30 }
31
32 public static void SetIPv6Address(byte[] buffer, Span<byte> address, uint scope)
33 {
36 address.CopyTo(buffer.AsSpan(8));
37 }
38}
static short ToInt16(byte[] value, int startIndex)
static void WriteUInt32LittleEndian(Span< byte > destination, uint value)
static void WriteUInt16LittleEndian(Span< byte > destination, ushort value)
static void WriteUInt16BigEndian(Span< byte > destination, ushort value)
static void SetIPv6Address(byte[] buffer, Span< byte > address, uint scope)
static void SetAddressFamily(byte[] buffer, AddressFamily family)
static void SetPort(byte[] buffer, ushort port)
static void SetIPv4Address(byte[] buffer, uint address)
static AddressFamily GetAddressFamily(ReadOnlySpan< byte > buffer)
void CopyTo(Span< T > destination)
Definition Span.cs:224