2018-11-21 17:11:31 -08:00
|
|
|
#![doc(html_root_url = "https://docs.rs/tokio-tcp/0.1.3")]
|
2019-05-14 10:27:36 -07:00
|
|
|
#![deny(missing_docs, missing_debug_implementations, rust_2018_idioms)]
|
|
|
|
|
#![cfg_attr(test, deny(warnings))]
|
|
|
|
|
#![doc(test(no_crate_inject, attr(deny(rust_2018_idioms))))]
|
2018-08-24 08:58:26 -07:00
|
|
|
|
2018-03-15 03:38:59 +11:00
|
|
|
//! UDP bindings for `tokio`.
|
|
|
|
|
//!
|
|
|
|
|
//! This module contains the UDP networking types, similar to the standard
|
|
|
|
|
//! library, which can be used to implement networking protocols.
|
|
|
|
|
//!
|
|
|
|
|
//! The main struct for UDP is the [`UdpSocket`], which represents a UDP socket.
|
|
|
|
|
//! Reading and writing to it can be done using futures, which return the
|
|
|
|
|
//! [`RecvDgram`] and [`SendDgram`] structs respectively.
|
|
|
|
|
//!
|
2018-05-08 14:44:17 -04:00
|
|
|
//! For convenience it's also possible to convert raw datagrams into higher-level
|
2018-03-15 03:38:59 +11:00
|
|
|
//! frames.
|
|
|
|
|
//!
|
|
|
|
|
//! [`UdpSocket`]: struct.UdpSocket.html
|
|
|
|
|
//! [`RecvDgram`]: struct.RecvDgram.html
|
|
|
|
|
//! [`SendDgram`]: struct.SendDgram.html
|
|
|
|
|
//! [`UdpFramed`]: struct.UdpFramed.html
|
|
|
|
|
//! [`framed`]: struct.UdpSocket.html#method.framed
|
|
|
|
|
|
|
|
|
|
mod frame;
|
|
|
|
|
mod recv_dgram;
|
2019-02-21 11:56:15 -08:00
|
|
|
mod send_dgram;
|
|
|
|
|
mod socket;
|
2018-03-15 03:38:59 +11:00
|
|
|
|
|
|
|
|
pub use self::frame::UdpFramed;
|
|
|
|
|
pub use self::recv_dgram::RecvDgram;
|
2019-02-21 11:56:15 -08:00
|
|
|
pub use self::send_dgram::SendDgram;
|
|
|
|
|
pub use self::socket::UdpSocket;
|