mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-26 00:00:16 +02:00
Also bumps: * tokio-async-await (0.1.5) * tokio-executor (0.1.6) * tokio-fs (0.1.5) * tokio-io (0.1.11) * tokio-reactor (0.1.8) * tokio-tcp (0.1.3) * tokio-threadpool (0.1.10) * tokio-tls (0.2.1) * tokio-uds (0.2.5) ...and updates LICENSE files to 2019.
41 lines
1.3 KiB
Rust
41 lines
1.3 KiB
Rust
#![doc(html_root_url = "https://docs.rs/tokio-tcp/0.1.3")]
|
|
#![deny(missing_docs, warnings, missing_debug_implementations)]
|
|
|
|
//! 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 [`ConnectFuture`]. `ConnectFuture`
|
|
//! implements 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
|
|
//! [`ConnectFuture`]: struct.ConnectFuture.html
|
|
//! [`TcpListener`]: struct.TcpListener.html
|
|
//! [incoming_method]: struct.TcpListener.html#method.incoming
|
|
//! [`Incoming`]: struct.Incoming.html
|
|
|
|
extern crate bytes;
|
|
#[macro_use]
|
|
extern crate futures;
|
|
extern crate iovec;
|
|
extern crate mio;
|
|
extern crate tokio_io;
|
|
extern crate tokio_reactor;
|
|
|
|
mod incoming;
|
|
mod listener;
|
|
mod stream;
|
|
|
|
pub use self::incoming::Incoming;
|
|
pub use self::listener::TcpListener;
|
|
pub use self::stream::TcpStream;
|
|
pub use self::stream::ConnectFuture;
|