logo
pub struct TcpStream { /* private fields */ }
Expand description

A TCP stream between a local and a remote socket.

This corresponds to async_std::net::TcpStream.

This TcpStream has no connect method. To create a TcpStream, first obtain a Pool permitting the address, and then call Pool::connect_tcp_stream.

Implementations

Constructs a new instance of Self from the given async_std::net::TcpStream.

This grants access the resources the async_std::net::TcpStream instance already has access to.

Returns the remote address that this stream is connected to.

This corresponds to async_std::net::TcpStream::peer_addr.

Returns the local socket address of this listener.

This corresponds to async_std::net::TcpStream::local_addr.

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

This corresponds to async_std::net::TcpStream::shutdown.

Receives data on the socket from the remote address to which it is connected, without removing that data from the queue.

This corresponds to async_std::net::TcpStream::peek.

Sets the value of the TCP_NODELAY option on this socket.

This corresponds to async_std::net::TcpStream::set_nodelay.

Gets the value of the TCP_NODELAY option on this socket.

This corresponds to async_std::net::TcpStream::nodelay.

Sets the value for the IP_TTL option on this socket.

This corresponds to async_std::net::TcpStream::set_ttl.

Gets the value of the IP_TTL option for this socket.

This corresponds to async_std::net::TcpStream::ttl.

Trait Implementations

Borrows the file descriptor. Read more
Extracts the raw file descriptor. Read more
Attempt to read from the AsyncRead into buf. Read more
Attempt to read from the AsyncRead into bufs using vectored IO operations. Read more
Attempt to read from the AsyncRead into buf. Read more
Attempt to read from the AsyncRead into bufs using vectored IO operations. Read more
Attempt to write bytes from buf into the object. Read more
Attempt to flush the object, ensuring that any buffered data reach their destination. Read more
Attempt to close the object. Read more
Attempt to write bytes from bufs into the object using vectored IO operations. Read more
Attempt to write bytes from buf into the object. Read more
Attempt to flush the object, ensuring that any buffered data reach their destination. Read more
Attempt to close the object. Read more
Attempt to write bytes from bufs into the object using vectored IO operations. Read more
Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Constructs a new instance of Self from the given file descriptor. Read more
Constructs a new instance of Self from the given file descriptor converted from into_owned. Read more
Constructs a new instance of Self from the given raw file descriptor. Read more
Consumes this object, returning the underlying file descriptor. Read more
Consumes this object, returning the raw underlying file descriptor. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Borrows the reference. Read more
Return a borrowing view of a resource which dereferences to a &Target. Read more
Extracts the grip.
Returns the raw value.
Extracts the raw grip.
Returns the raw value.
Borrows the reference.
Return a borrowing view of a resource which dereferences to a &Target. Read more
Reads some bytes from the byte stream. Read more
Like [read()][AsyncReadExt::read()], except it reads into a slice of buffers. Read more
Reads the entire contents and appends them to a Vec. Read more
Reads the entire contents and appends them to a String. Read more
Reads the exact number of bytes required to fill buf. Read more
Creates an adapter which will read at most limit bytes from it. Read more
Converts this [AsyncRead] into a [Stream] of bytes. Read more
Creates an adapter which will chain this stream with another. Read more
Boxes the reader and changes its type to dyn AsyncRead + Send + 'a. Read more
Writes some bytes into the byte stream. Read more
Like [write()][AsyncWriteExt::write()], except that it writes a slice of buffers. Read more
Writes an entire buffer into the byte stream. Read more
Flushes the stream to ensure that all buffered contents reach their destination. Read more
Closes the writer. Read more
Boxes the writer and changes its type to dyn AsyncWrite + Send + 'a. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Constructs a new instance of Self from the given filelike object. Read more
Constructs a new instance of Self from the given filelike object converted from into_owned. Read more
Consume an OwnedGrip and convert into a Self.
Constructs Self from the raw value. Read more
Consume an RawGrip and convert into a Self. Read more
Constructs Self from the raw value. Read more
Constructs a new instance of Self from the given socketlike object.
Constructs a new instance of Self from the given socketlike object converted from into_owned. Read more

Calls U::from(self).

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

Consumes this object, returning the underlying filelike object. Read more
Consume self and convert into an OwnedGrip.
Returns the raw value.
Consume self and convert into an RawGrip.
Returns the raw value.
Consumes this object, returning the underlying socketlike object.
Reads some bytes from the byte stream. Read more
Like read, except that it reads into a slice of buffers. Read more
Reads all bytes from the byte stream. Read more
Reads all bytes from the byte stream and appends them into a string. Read more
Reads the exact number of bytes required to fill buf. Read more
Creates an adaptor which will read at most limit bytes from it. Read more
Creates a “by reference” adaptor for this instance of Read. Read more
Transforms this Read instance to a Stream over its bytes. Read more
Creates an adaptor which will chain this stream with another. Read more
Set the last access and last modification timestamps of an open file handle. Read more
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
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.
Writes some bytes into the byte stream. Read more
Flushes the stream to ensure that all buffered contents reach their destination. Read more
Like write, except that it writes from a slice of buffers. Read more
Writes an entire buffer into the byte stream. Read more
Writes a formatted string into this writer, returning any error encountered. Read more