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

◆ CopyOutAddress()

static unsafe void Interop.HttpApi.CopyOutAddress ( IntPtr address,
ref SocketAddress v4address,
ref SocketAddress v6address )
inlinestaticprivate

Definition at line 912 of file Interop.cs.

913 {
914 if (address != IntPtr.Zero)
915 {
916 switch (*(ushort*)(void*)address)
917 {
918 case 2:
919 {
920 v6address = null;
921 for (int j = 2; j < 16; j++)
922 {
923 v4address[j] = ((byte*)(void*)address)[j];
924 }
925 return;
926 }
927 case 23:
928 {
929 v4address = null;
930 for (int i = 2; i < 28; i++)
931 {
932 v6address[i] = ((byte*)(void*)address)[i];
933 }
934 return;
935 }
936 }
937 }
938 v4address = null;
939 v6address = null;
940 }
static readonly IntPtr Zero
Definition IntPtr.cs:18

References System.IntPtr.Zero.

Referenced by Interop.HttpApi.GetLocalEndPoint(), and Interop.HttpApi.GetRemoteEndPoint().