pub struct AcceptToken { /* private fields */ }Expand description
A connection attempt accepted from a TcpListener, returned by
TcpListener::accept.
Pass it to TcpSocket::accept to set up a socket for it.
Dropping the token forgets the attempt. The client retransmits its SYN, which queues the attempt on the listener again.
Implementations§
Source§impl AcceptToken
impl AcceptToken
Sourcepub fn local_addr(&self) -> SocketAddr
pub fn local_addr(&self) -> SocketAddr
The local address the client is connecting to.
Sourcepub fn remote_addr(&self) -> SocketAddr
pub fn remote_addr(&self) -> SocketAddr
The remote address the connection attempt comes from.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AcceptToken
impl RefUnwindSafe for AcceptToken
impl Send for AcceptToken
impl Sync for AcceptToken
impl Unpin for AcceptToken
impl UnsafeUnpin for AcceptToken
impl UnwindSafe for AcceptToken
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