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

◆ Receive()

byte[] System.Net.Sockets.UdpClient.Receive ( [NotNull] ref IPEndPoint? remoteEP)
inline

Definition at line 640 of file UdpClient.cs.

641 {
643 EndPoint remoteEP2 = ((_family != AddressFamily.InterNetwork) ? IPEndPointStatics.IPv6Any : IPEndPointStatics.Any);
644 int num = Client.ReceiveFrom(_buffer, 65536, SocketFlags.None, ref remoteEP2);
645 remoteEP = (IPEndPoint)remoteEP2;
646 if (num < 65536)
647 {
648 byte[] array = new byte[num];
649 Buffer.BlockCopy(_buffer, 0, array, 0, num);
650 return array;
651 }
652 return _buffer;
653 }
readonly byte[] _buffer
Definition UdpClient.cs:14

References System.Net.Sockets.UdpClient._buffer, System.Net.Sockets.UdpClient._family, System.Net.IPEndPointStatics.Any, System.array, System.Buffer.BlockCopy(), System.Net.IPEndPointStatics.IPv6Any, and System.Net.Sockets.UdpClient.ThrowIfDisposed().