Struct message_io::network::NetworkProcessor [−][src]
pub struct NetworkProcessor { /* fields omitted */ }
Expand description
Instance in charge of process input network events.
These events are offered to the user as a NetEvent
its processing data.
Implementations
Process the next poll event.
This method waits the timeout specified until the poll event is generated.
If None
is passed as timeout, it will wait indefinitely.
Note that there is no 1-1 relation between an internal poll event and a NetEvent
.
You need to assume that process an internal poll event could call 0 or N times to
the callback with diferents NetEvent
s.
pub fn process_poll_events_until_timeout(
&mut self,
timeout: Duration,
event_callback: impl FnMut(NetEvent<'_>)
)
pub fn process_poll_events_until_timeout(
&mut self,
timeout: Duration,
event_callback: impl FnMut(NetEvent<'_>)
)
Process poll events until there is no more events during a timeout
duration.
This method makes succesive calls to NetworkProcessor::process_poll_event()
.