diff options
Diffstat (limited to 'tokio')
-rw-r--r-- | tokio/src/net/udp/socket.rs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tokio/src/net/udp/socket.rs b/tokio/src/net/udp/socket.rs index 77e5dd43..d13e92bc 100644 --- a/tokio/src/net/udp/socket.rs +++ b/tokio/src/net/udp/socket.rs @@ -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. |