[−][src]Module runtime::net::tcp
Asynchronous TCP bindings.
Connecting to an address over TCP is done by using TcpStream::connect
. This returns a
Connect
future which resolves to a TcpStream
.
To listen for incoming TCP connections use TcpListener.bind
, which creates a new
TcpListener
. Then use the the incoming
method to accept new connections, yielding a
stream of TcpStream
s.
Structs
Accept | The future returned by |
Connect | The future returned by |
Incoming | A stream that infinitely |
TcpListener | A TCP socket server, listening for connections. |
TcpStream | A TCP stream between a local and a remote socket. |