Skip to main content

drive_messages_until

Function drive_messages_until 

Source
pub fn drive_messages_until<H, T>(
    handshake: H,
    transport: &mut T,
    deadline: Instant,
) -> Result<Established<H::Output>, DriveError<H::Error>>
Expand description

drive_messages that ends at deadline: every receive and send waits at most what is left until it, through ReadTimeout and WriteTimeout, and both timeouts are cleared before it returns.

ยงErrors

DriveError::TimedOut when deadline passes first; otherwise as drive_messages.