You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// Sends a UDP datagram asynchronously to a remote host.
606
+
/// </summary>
607
+
/// <param name="datagram">
608
+
/// An <see cref="ReadOnlyMemory{T}"/> of Type <see cref="byte"/> that specifies the UDP datagram that you intend to send.
609
+
/// </param>
610
+
/// <param name="cancellationToken">
611
+
/// The token to monitor for cancellation requests. The default value is None.
612
+
/// </param>
613
+
/// <returns>A <see cref="ValueTask{T}"/> that represents the asynchronous send operation. The value of its Result property contains the number of bytes sent.</returns>
614
+
/// <exception cref="ObjectDisposedException">The <see cref="UdpClient"/> is closed.</exception>
615
+
/// <exception cref="SocketException">An error occurred when accessing the socket.</exception>
/// Sends a UDP datagram asynchronously to a remote host.
624
+
/// </summary>
625
+
/// <param name="datagram">
626
+
/// An <see cref="ReadOnlyMemory{T}"/> of Type <see cref="byte"/> that specifies the UDP datagram that you intend to send.
627
+
/// </param>
628
+
/// <param name="hostname">
629
+
/// The name of the remote host to which you intend to send the datagram.
630
+
/// </param>
631
+
/// <param name="port">
632
+
/// The remote port number with which you intend to communicate.
633
+
/// </param>
634
+
/// <param name="cancellationToken">
635
+
/// The token to monitor for cancellation requests. The default value is None.
636
+
/// </param>
637
+
/// <returns>A <see cref="ValueTask{T}"/> that represents the asynchronous send operation. The value of its Result property contains the number of bytes sent.</returns>
638
+
/// <exception cref="InvalidOperationException">The <see cref="UdpClient"/> has already established a default remote host.</exception>
639
+
/// <exception cref="ObjectDisposedException">The <see cref="UdpClient"/> is closed.</exception>
640
+
/// <exception cref="SocketException">An error occurred when accessing the socket.</exception>
@@ -618,6 +656,39 @@ public Task<int> SendAsync(byte[] datagram, int bytes, IPEndPoint? endPoint)
618
656
}
619
657
}
620
658
659
+
/// <summary>
660
+
/// Sends a UDP datagram asynchronously to a remote host.
661
+
/// </summary>
662
+
/// <param name="datagram">
663
+
/// An <see cref="ReadOnlyMemory{T}"/> of Type <see cref="byte"/> that specifies the UDP datagram that you intend to send.
664
+
/// </param>
665
+
/// <param name="endPoint">
666
+
/// An <see cref="IPEndPoint"/> that represents the host and port to which to send the datagram.
667
+
/// </param>
668
+
/// <param name="cancellationToken">
669
+
/// The token to monitor for cancellation requests. The default value is None.
670
+
/// </param>
671
+
/// <returns>A <see cref="ValueTask{T}"/> that represents the asynchronous send operation. The value of its Result property contains the number of bytes sent.</returns>
672
+
/// <exception cref="InvalidOperationException"><see cref="UdpClient"/> has already established a default remote host and <paramref name="endPoint"/> is not <see langword="null"/>.</exception>
673
+
/// <exception cref="ObjectDisposedException">The <see cref="UdpClient"/> is closed.</exception>
674
+
/// <exception cref="SocketException">An error occurred when accessing the socket.</exception>
/// Sends a UDP datagram to the host at the specified remote endpoint.
998
+
/// </summary>
999
+
/// <param name="datagram">
1000
+
/// An <see cref="ReadOnlySpan{T}"/> of Type <see cref="byte"/> that specifies the UDP datagram that you intend to send.
1001
+
/// </param>
1002
+
/// <param name="endPoint">
1003
+
/// An <see cref="IPEndPoint"/> that represents the host and port to which to send the datagram.
1004
+
/// </param>
1005
+
/// <returns>The number of bytes sent.</returns>
1006
+
/// <exception cref="InvalidOperationException"><see cref="UdpClient"/> has already established a default remote host and <paramref name="endPoint"/> is not <see langword="null"/>.</exception>
1007
+
/// <exception cref="ObjectDisposedException"><see cref="UdpClient"/> is closed.</exception>
1008
+
/// <exception cref="SocketException">An error occurred when accessing the socket.</exception>
Copy file name to clipboardExpand all lines: src/libraries/System.Net.Sockets/src/System/Net/Sockets/UdpReceiveResult.cs
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@
6
6
namespaceSystem.Net.Sockets
7
7
{
8
8
/// <summary>
9
-
/// Presents UDP receive result information from a call to the <see cref="UdpClient.ReceiveAsync"/> method
9
+
/// Presents UDP receive result information from a call to the <see cref="UdpClient.ReceiveAsync()"/> and <see cref="UdpClient.ReceiveAsync(System.Threading.CancellationToken)"/> method
0 commit comments