Struct s2n_quic_transport::endpoint::handle::Acceptor
source · pub struct Acceptor { /* private fields */ }
Implementations§
source§impl Acceptor
impl Acceptor
sourcepub fn poll_accept(
&mut self,
context: &mut Context<'_>
) -> Poll<Option<Connection>>
pub fn poll_accept( &mut self, context: &mut Context<'_> ) -> Poll<Option<Connection>>
Polls for incoming connections and returns them.
The method will return
Poll::Ready(Some(connection))
if a connection was accepted.Poll::Ready(None)
if the acceptor is closed.Poll::Pending
if no new connection was accepted yet. In this case the caller must retry polling as soon as a client establishes a connection. In order to notify the application of this condition, the method will save thecore::task::Waker
which is provided as part of theContext
parameter, and notify it as soon as retrying the method will yield a different result.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Acceptor
impl !RefUnwindSafe for Acceptor
impl Send for Acceptor
impl Sync for Acceptor
impl Unpin for Acceptor
impl !UnwindSafe for Acceptor
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