pub(crate) trait SessionStream:
AsyncRead
+ AsyncWrite
+ Unpin
+ Send
+ Sync
+ Debug {
// Required methods
fn set_read_timeout(&mut self, timeout: Option<Duration>);
fn peer_addr(&self) -> Result<SocketAddr>;
}
Required Methods§
Sourcefn set_read_timeout(&mut self, timeout: Option<Duration>)
fn set_read_timeout(&mut self, timeout: Option<Duration>)
Change the read timeout on the session stream.
Sourcefn peer_addr(&self) -> Result<SocketAddr>
fn peer_addr(&self) -> Result<SocketAddr>
Returns the remote address that this stream is connected to.
Trait Implementations§
Source§impl SessionStream for Box<dyn SessionStream>
impl SessionStream for Box<dyn SessionStream>
Source§fn set_read_timeout(&mut self, timeout: Option<Duration>)
fn set_read_timeout(&mut self, timeout: Option<Duration>)
Change the read timeout on the session stream.
Source§fn peer_addr(&self) -> Result<SocketAddr>
fn peer_addr(&self) -> Result<SocketAddr>
Returns the remote address that this stream is connected to.