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 ushort GetPort(ReadOnlySpan<byte> buffer)
23 {
25 }
26
27 public static void SetPort(byte[] buffer, ushort port)
28 {
30 }
31
33 {
35 }
36
37 public static void GetIPv6Address(ReadOnlySpan<byte> buffer, Span<byte> address, out uint scope)
38 {
39 buffer.Slice(8, address.Length).CopyTo(address);
41 }
42
43 public static void SetIPv4Address(byte[] buffer, uint address)
44 {
46 }
47
48 public static void SetIPv6Address(byte[] buffer, Span<byte> address, uint scope)
49 {
52 address.CopyTo(buffer.AsSpan(8));
53 }
54}
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 ushort ReadUInt16BigEndian(ReadOnlySpan< byte > source)
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 ushort GetPort(ReadOnlySpan< byte > buffer)
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