docs: fix typos on UdpSocket (#2979)

This commit is contained in:
Evan Cameron
2020-10-17 12:13:23 +02:00
committed by GitHub
parent 3cc6ce7a99
commit e88e64bcc0
+5 -4
View File
@@ -11,10 +11,11 @@ cfg_net! {
///
/// UDP is "connectionless", unlike TCP. Meaning, regardless of what address you've bound to, a `UdpSocket`
/// is free to communicate with many different remotes. In tokio there are basically two main ways to use `UdpSocket`:
/// - one to many: [`bind`](`UdpSocket::bind`) and use [`send_to`](`UdpSocket::send_to`)
/// and `[`recv_from`](`UdpSocket::recv_from`) to communicate with many different addresses
/// - one to one: [`connect`](`UdpSocket::connect`) and associate with a single address, using [`send`](`UdpSocket::send`)
/// and `[`recv`](`UdpSocket::recv`) to communicate only with that remote address
///
/// * one to many: [`bind`](`UdpSocket::bind`) and use [`send_to`](`UdpSocket::send_to`)
/// and [`recv_from`](`UdpSocket::recv_from`) to communicate with many different addresses
/// * one to one: [`connect`](`UdpSocket::connect`) and associate with a single address, using [`send`](`UdpSocket::send`)
/// and [`recv`](`UdpSocket::recv`) to communicate only with that remote address
///
/// `UdpSocket` can also be used concurrently to `send_to` and `recv_from` in different tasks,
/// all that's required is that you `Arc<UdpSocket>` and clone a reference for each task.