summaryrefslogtreecommitdiffstats
path: root/tokio/src/net/tcp/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tokio/src/net/tcp/mod.rs')
-rw-r--r--tokio/src/net/tcp/mod.rs29
1 files changed, 29 insertions, 0 deletions
diff --git a/tokio/src/net/tcp/mod.rs b/tokio/src/net/tcp/mod.rs
new file mode 100644
index 00000000..f80eb833
--- /dev/null
+++ b/tokio/src/net/tcp/mod.rs
@@ -0,0 +1,29 @@
+//! 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`][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
+
+mod incoming;
+pub use self::incoming::Incoming;
+
+mod listener;
+pub use self::listener::TcpListener;
+
+pub mod split;
+
+mod stream;
+pub use self::stream::TcpStream;