pub fn select<'a, N, R, W, E, T>(
nfds: N,
readfds: R,
writefds: W,
errorfds: E,
timeout: T,
) -> Result<c_int>
Expand description
Monitors file descriptors for readiness
Returns the total number of ready file descriptors in all sets. The sets are changed so that all file descriptors that are ready for the given operation are set.
When this function returns, timeout
has an implementation-defined value.
§Parameters
nfds
: The highest file descriptor set in any of the passedFdSet
s, plus 1. IfNone
, this is calculated automatically by callingFdSet::highest
on all descriptor sets and adding 1 to the maximum of that.readfds
: File descriptors to check for being ready to read.writefds
: File descriptors to check for being ready to write.errorfds
: File descriptors to check for pending error conditions.timeout
: Maximum time to wait for descriptors to become ready (None
to block indefinitely).