// Returns the sender's next secrets to use, or the receiver's error.
Returns the sender's next secrets to use, or the receiver's error.
Returns the sender ' s next secrets to use or the receiver ' s error .
fn step(send: &mut dyn Session, recv: &mut dyn Session) -> Result<Option<quic::Keys>, TLSError> {
        let mut buf = Vec::new();
        let secrets = loop {
            let prev = buf.len();
            if let Some(x) = send.write_hs(&mut buf) {
                break Some(x);
            }
            if prev == buf.len() {
                break None;
            }
        };
        if let Err(e) = recv.read_hs(&buf) {
            return Err(e);
        } else {
            assert_eq!(recv.get_alert(), None);
        }
        Ok(secrets)
    }
fn step ( send : & mut dyn Session , recv : & mut dyn Session ) -> Result < Option < quic :: Keys > , TLSError > { let mut buf = Vec :: new ( ) ; let secrets = loop { let prev = buf . len ( ) ; if let Some ( x ) = send . write_hs ( & mut buf ) { break Some ( x ) ; } if prev == buf . len ( ) { break None ; } } ; if let Err ( e ) = recv . read_hs ( & buf ) { return Err ( e ) ; } else { assert_eq ! ( recv get_alert ( ) None ) ; } Ok ( secrets ) }
Returns the sender's next secrets to use, or the receiver's error.
Returns the sender ' s next secrets to use or the receiver ' s error .
send
&mut dyn Session
recv
&mut dyn Session