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
|
|
|
|
|
|
2018-06-13 10:24:56 -07:00
|
|
|
#![doc(html_root_url = "https://docs.rs/tokio-tcp/0.1.1")]
|
2018-03-15 03:38:59 +11:00
|
|
|
#![deny(missing_docs, warnings, missing_debug_implementations)]
|
|
|
|
|
|
|
|
|
|
extern crate bytes;
|
|
|
|
|
#[macro_use]
|
|
|
|
|
extern crate futures;
|
|
|
|
|
extern crate mio;
|
|
|
|
|
#[macro_use]
|
|
|
|
|
extern crate log;
|
2018-06-04 22:36:06 -05:00
|
|
|
extern crate tokio_codec;
|
2018-03-15 03:38:59 +11:00
|
|
|
extern crate tokio_io;
|
|
|
|
|
extern crate tokio_reactor;
|
|
|
|
|
|
|
|
|
|
mod frame;
|
|
|
|
|
mod socket;
|
|
|
|
|
mod send_dgram;
|
|
|
|
|
mod recv_dgram;
|
|
|
|
|
|
|
|
|
|
pub use self::frame::UdpFramed;
|
|
|
|
|
pub use self::socket::UdpSocket;
|
|
|
|
|
pub use self::send_dgram::SendDgram;
|
|
|
|
|
pub use self::recv_dgram::RecvDgram;
|