Skip to main content

wait_ready

Function wait_ready 

Source
pub fn wait_ready(
    fd: c_int,
    events: i16,
    timeout_ms: c_int,
) -> Result<Ready, i32>
Expand description

Wait for fd to be ready, for at most timeout_ms.

Every blocking call on a Bluetooth socket goes through this first. read and write on an L2CAP socket can both park in the kernel with no deadline of their own — a channel suspended pending security will hold a write forever, with SO_SNDTIMEO unset — and a caller that has already decided how long it is willing to wait cannot express that to them.