diff options
author | Carl Lerche <me@carllerche.com> | 2019-11-25 14:32:55 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-25 14:32:55 -0800 |
commit | 4ddc4371709562d2bd1d0373f0555f7c31926e53 (patch) | |
tree | c34ef5906bf8ea7e7c732bd2c211795657e33455 /tokio/src/net/tcp/mod.rs | |
parent | 3ecaa6d91cef271b4c079a2e28bc3270280bcee6 (diff) |
doc: add more doc_cfg annotations (#1821)
Also makes the `tokio::net::{tcp, udp, unix}` modules only for "utility"
types. The primary types are in `tokio::net` directly.
Diffstat (limited to 'tokio/src/net/tcp/mod.rs')
-rw-r--r-- | tokio/src/net/tcp/mod.rs | 25 |
1 files changed, 5 insertions, 20 deletions
diff --git a/tokio/src/net/tcp/mod.rs b/tokio/src/net/tcp/mod.rs index 929a1e00..d5354b38 100644 --- a/tokio/src/net/tcp/mod.rs +++ b/tokio/src/net/tcp/mod.rs @@ -1,22 +1,7 @@ -//! TCP bindings for `tokio`. -//! -//! This module contains the TCP networking types, similar to the standard -//! library, which can be used to implement networking protocols. -//! -//! Connecting to an address, via TCP, can be done using [`TcpStream`]'s -//! [`connect`] method, which returns a future which returns a `TcpStream`. -//! -//! To listen on an address [`TcpListener`] can be used. `TcpListener`'s -//! [`incoming`][TcpListener::incoming] method can be used to accept new connections. -//! It return the [`Incoming`] struct, which implements a stream which returns -//! `TcpStream`s. -//! -//! [`TcpStream`]: struct.TcpStream.html -//! [`connect`]: struct.TcpStream.html#method.connect -//! [`TcpListener`]: struct.TcpListener.html +//! TCP utility types -mod listener; -pub use listener::TcpListener; +pub(crate) mod listener; +pub(crate) use listener::TcpListener; mod incoming; pub use incoming::Incoming; @@ -24,5 +9,5 @@ pub use incoming::Incoming; mod split; pub use split::{ReadHalf, WriteHalf}; -mod stream; -pub use stream::TcpStream; +pub(crate) mod stream; +pub(crate) use stream::TcpStream; |