tokio_udp/lib.rs
1#![doc(html_root_url = "https://docs.rs/tokio-tcp/0.1.6")]
2#![deny(missing_docs, missing_debug_implementations)]
3
4//! UDP bindings for `tokio`.
5//!
6//! > **Note:** This crate is **deprecated in tokio 0.2.x** and has been moved
7//! > into[`tokio::udp`] behind the `udp` [feature flag].
8//!
9//! [`tokio::udp`]: https://docs.rs/tokio/latest/tokio/udp/index.html
10//! [feature flag]: https://docs.rs/tokio/latest/tokio/index.html#feature-flags
11//!
12//! This module contains the UDP networking types, similar to the standard
13//! library, which can be used to implement networking protocols.
14//!
15//! The main struct for UDP is the [`UdpSocket`], which represents a UDP socket.
16//! Reading and writing to it can be done using futures, which return the
17//! [`RecvDgram`] and [`SendDgram`] structs respectively.
18//!
19//! For convenience it's also possible to convert raw datagrams into higher-level
20//! frames.
21//!
22//! [`UdpSocket`]: struct.UdpSocket.html
23//! [`RecvDgram`]: struct.RecvDgram.html
24//! [`SendDgram`]: struct.SendDgram.html
25//! [`UdpFramed`]: struct.UdpFramed.html
26//! [`framed`]: struct.UdpSocket.html#method.framed
27
28extern crate bytes;
29#[macro_use]
30extern crate futures;
31extern crate mio;
32#[macro_use]
33extern crate log;
34extern crate tokio_codec;
35extern crate tokio_io;
36extern crate tokio_reactor;
37
38mod frame;
39mod recv_dgram;
40mod send_dgram;
41mod socket;
42
43pub use self::frame::UdpFramed;
44pub use self::recv_dgram::RecvDgram;
45pub use self::send_dgram::SendDgram;
46pub use self::socket::UdpSocket;