pub struct TcpConnection { /* private fields */ }
Expand description
A pending incoming TCP connection, usually used to initialize a new
mtcp_rs::TcpStream
Unlike an mtcp_rs::TcpStream
instance, the mtcp_rs::TcpConnection
instance is not yet tied to a
mtcp_rs::TcpManager
instance and can therefore
safely be moved across the thread boundary.
Implementations§
Source§impl TcpConnection
impl TcpConnection
Sourcepub fn peer_addr(&self) -> Option<SocketAddr>
pub fn peer_addr(&self) -> Option<SocketAddr>
Get the peer socket address of this TCP connection.
Sourcepub fn local_addr(&self) -> Option<SocketAddr>
pub fn local_addr(&self) -> Option<SocketAddr>
Get the local socket address of this TCP connection.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for TcpConnection
impl RefUnwindSafe for TcpConnection
impl Send for TcpConnection
impl Sync for TcpConnection
impl Unpin for TcpConnection
impl UnwindSafe for TcpConnection
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more