Trait pal_async::socket::PollSocketReady
source · pub trait PollSocketReady:
Unpin
+ Send
+ Sync {
// Required methods
fn poll_socket_ready(
&mut self,
cx: &mut Context<'_>,
slot: InterestSlot,
events: PollEvents,
) -> Poll<PollEvents>;
fn clear_socket_ready(&mut self, slot: InterestSlot);
}
Expand description
A trait for polling socket readiness.
Required Methods§
sourcefn poll_socket_ready(
&mut self,
cx: &mut Context<'_>,
slot: InterestSlot,
events: PollEvents,
) -> Poll<PollEvents>
fn poll_socket_ready( &mut self, cx: &mut Context<'_>, slot: InterestSlot, events: PollEvents, ) -> Poll<PollEvents>
Polls a socket for readiness.
sourcefn clear_socket_ready(&mut self, slot: InterestSlot)
fn clear_socket_ready(&mut self, slot: InterestSlot)
Clears cached socket readiness so that the next call to
poll_socket_ready
will poll the OS again.