mirror of
https://github.com/tokio-rs/tokio.git
synced 2025-09-25 12:00:35 +00:00
docs: fix typos on UdpSocket (#2979)
This commit is contained in:
parent
3cc6ce7a99
commit
e88e64bcc0
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user