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

◆ SendAsync() [2/6]

Task< int > System.Net.Sockets.UdpClient.SendAsync ( byte[] datagram,
int bytes,
IPEndPoint? endPoint )
inline

Definition at line 449 of file UdpClient.cs.

450 {
451 ValidateDatagram(datagram, bytes, endPoint);
452 if (endPoint == null)
453 {
454 return _clientSocket.SendAsync(new ArraySegment<byte>(datagram, 0, bytes), SocketFlags.None);
455 }
456 CheckForBroadcast(endPoint.Address);
457 return _clientSocket.SendToAsync(new ArraySegment<byte>(datagram, 0, bytes), SocketFlags.None, endPoint);
458 }
bool SendAsync(SocketAsyncEventArgs e)
Definition Socket.cs:3104
bool SendToAsync(SocketAsyncEventArgs e)
Definition Socket.cs:3164
void CheckForBroadcast(IPAddress ipAddress)
Definition UdpClient.cs:207
void ValidateDatagram(byte[] datagram, int bytes, IPEndPoint endPoint)
Definition UdpClient.cs:256

References System.Net.Sockets.UdpClient._clientSocket, System.Net.IPEndPoint.Address, System.bytes, System.Net.Sockets.UdpClient.CheckForBroadcast(), System.Net.Sockets.Socket.SendAsync(), System.Net.Sockets.Socket.SendToAsync(), and System.Net.Sockets.UdpClient.ValidateDatagram().