pub struct TcpStream(_);
Expand description

A TCP stream between a local and a remote socket.

This type is an async version of std::net::TcpStream.

Implementations

Opens a TCP connection to a remote host.

See also std::net::TcpStream::connect.

Shuts down the read, write, or both halves of this connection.

See also std::net::TcpStream::shutdown.

Returns the socket address of the local half of this connection.

See also std::net::TcpStream::local_addr.

Returns the socket address of the remote peer of this connection.

See also std::net::TcpStream::peer_addr.

Gets the value of the IP_TTL option on this socket.

See also std::net::TcpStream::ttl.

Sets the value of the IP_TTL option on this socket.

See also std::net::TcpStream::set_ttl.

Gets the value of the TCP_NODELAY option on this socket.

See also std::net::TcpStream::nodelay.

Sets the value of the TCP_NODELAY option on this socket.

See also std::net::TcpStream::set_nodelay.

Trait Implementations

Borrows the file descriptor. Read more
Extracts the raw file descriptor. Read more
Formats the value using the given formatter. Read more
Constructs a new instance of Self from the given raw file descriptor. Read more
Consumes this object, returning the raw underlying file descriptor. Read more
A future that resolves to the result of Self::read.
Reads some bytes from this object into buf. Read more
A future that resolves to the result of Self::write.
Writes some bytes from buf into this object. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

A future that resolves to the result of Self::read_exact.
Reads the exact number of bytes from this object to fill buf.
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
A future that resolves to the result of Self::write_all.
Writes all bytes from buf into this object.