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
28 {
30 }
31
32 public static void GetIPv6Address(ReadOnlySpan<byte> buffer, Span<byte> address, out uint scope)
33 {
34 buffer.Slice(8, address.Length).CopyTo(address);
36 }
37
38 public static void SetIPv4Address(byte[] buffer, uint address)
39 {
41 }
42
43 public static void SetIPv6Address(byte[] buffer, Span<byte> address, uint scope)
44 {
47 address.CopyTo(buffer.AsSpan(8));
48 }
49}
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 uint ReadUInt32LittleEndian(ReadOnlySpan< byte > source)
static uint GetIPv4Address(ReadOnlySpan< byte > buffer)
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 void GetIPv6Address(ReadOnlySpan< byte > buffer, Span< byte > address, out uint scope)
static AddressFamily GetAddressFamily(ReadOnlySpan< byte > buffer)
void CopyTo(Span< T > destination)
Definition Span.cs:224
int Length
Definition Span.cs:70