rama_udp/
lib.rs

1//! UDP module for Rama.
2//!
3//! # Rama
4//!
5//! Crate used by the end-user `rama` crate and `rama` crate authors alike.
6//!
7//! Learn more about `rama`:
8//!
9//! - Github: <https://github.com/plabayo/rama>
10//! - Book: <https://ramaproxy.org/book/>
11
12#![doc(
13    html_favicon_url = "https://raw.githubusercontent.com/plabayo/rama/main/docs/img/old_logo.png"
14)]
15#![doc(html_logo_url = "https://raw.githubusercontent.com/plabayo/rama/main/docs/img/old_logo.png")]
16#![cfg_attr(docsrs, feature(doc_auto_cfg, doc_cfg))]
17#![cfg_attr(test, allow(clippy::float_cmp))]
18#![cfg_attr(not(test), warn(clippy::print_stdout, clippy::dbg_macro))]
19
20mod socket;
21pub use socket::UdpSocket;
22
23#[doc(inline)]
24pub use tokio_util::udp::UdpFramed;
25
26pub mod codec {
27    //! Adaptors from `AsyncRead`/`AsyncWrite` to Stream/Sink
28    //!
29    //! Raw I/O objects work with byte sequences, but higher-level code usually
30    //! wants to batch these into meaningful chunks, called "frames".
31    //!
32    //! Re-export of [`tokio_util::codec`].
33
34    pub use tokio_util::codec::*;
35}