Struct rocket_http::hyper::server::conn::AddrStream
source · pub struct AddrStream { /* private fields */ }
Expand description
A transport returned yieled by AddrIncoming
.
Implementations§
source§impl AddrStream
impl AddrStream
sourcepub fn remote_addr(&self) -> SocketAddr
pub fn remote_addr(&self) -> SocketAddr
Returns the remote (peer) address of this connection.
sourcepub fn local_addr(&self) -> SocketAddr
pub fn local_addr(&self) -> SocketAddr
Returns the local address of this connection.
sourcepub fn into_inner(self) -> TcpStream
pub fn into_inner(self) -> TcpStream
Consumes the AddrStream and returns the underlying IO object
Trait Implementations§
source§impl AsyncRead for AddrStream
impl AsyncRead for AddrStream
source§impl AsyncWrite for AddrStream
impl AsyncWrite for AddrStream
source§fn poll_write(
self: Pin<&mut AddrStream>,
cx: &mut Context<'_>,
buf: &[u8]
) -> Poll<Result<usize, Error>>
fn poll_write( self: Pin<&mut AddrStream>, cx: &mut Context<'_>, buf: &[u8] ) -> Poll<Result<usize, Error>>
Attempt to write bytes from
buf
into the object. Read moresource§fn poll_write_vectored(
self: Pin<&mut AddrStream>,
cx: &mut Context<'_>,
bufs: &[IoSlice<'_>]
) -> Poll<Result<usize, Error>>
fn poll_write_vectored( self: Pin<&mut AddrStream>, cx: &mut Context<'_>, bufs: &[IoSlice<'_>] ) -> Poll<Result<usize, Error>>
Like
poll_write
, except that it writes from a slice of buffers. Read moresource§fn poll_flush(
self: Pin<&mut AddrStream>,
_cx: &mut Context<'_>
) -> Poll<Result<(), Error>>
fn poll_flush( self: Pin<&mut AddrStream>, _cx: &mut Context<'_> ) -> Poll<Result<(), Error>>
Attempts to flush the object, ensuring that any buffered data reach
their destination. Read more
source§fn poll_shutdown(
self: Pin<&mut AddrStream>,
cx: &mut Context<'_>
) -> Poll<Result<(), Error>>
fn poll_shutdown( self: Pin<&mut AddrStream>, cx: &mut Context<'_> ) -> Poll<Result<(), Error>>
Initiates or attempts to shut down this writer, returning success when
the I/O connection has completely shut down. Read more
source§fn is_write_vectored(&self) -> bool
fn is_write_vectored(&self) -> bool
Determines if this writer has an efficient
poll_write_vectored
implementation. Read more