Files
tokio/tokio-tcp/src/lib.rs
T

34 lines
1.2 KiB
Rust
Raw Normal View History

2019-01-06 23:25:55 -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))))]
#![feature(async_await)]
2018-09-26 22:32:51 -07:00
//! 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
2019-06-24 12:34:30 -07:00
//! [`connect`] method, which returns a future which returns a `TcpStream`.
//!
//! To listen on an address [`TcpListener`] can be used. `TcpListener`'s
//! [`incoming`][incoming_method] 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
//! [incoming_method]: struct.TcpListener.html#method.incoming
//! [`Incoming`]: struct.Incoming.html
2019-06-24 12:34:30 -07:00
#[cfg(feature = "incoming")]
mod incoming;
mod listener;
2019-06-29 14:36:49 +08:00
pub mod split;
mod stream;
pub use self::listener::TcpListener;
2019-02-21 11:56:15 -08:00
pub use self::stream::TcpStream;