pub fn assert_vn(payload: &[u8]) {
    let mut dec = Decoder::from(payload);
    assert_eq!(dec.decode_byte().unwrap() & 0x80, 0x80, "is long header");
    assert_eq!(dec.decode_uint(4).unwrap(), 0);
    dec.skip_vec(1); // DCID
    dec.skip_vec(1); // SCID
    assert_eq!(dec.remaining() % 4, 0);
}
/// Simple checks for a Version Negotiation packet.
/// # Panics
/// If this is clearly not a Version Negotiation packet.
Simple checks for a Version Negotiation packet.
Simple checks for a Version Negotiation packet .
pub fn assert_vn(payload: &[u8]) {
    let mut dec = Decoder::from(payload);
    assert_eq!(dec.decode_byte().unwrap() & 0x80, 0x80, "is long header");
    assert_eq!(dec.decode_uint(4).unwrap(), 0);
    dec.skip_vec(1); // DCID
    dec.skip_vec(1); // SCID
    assert_eq!(dec.remaining() % 4, 0);
}
pub fn assert_vn ( payload : & [ u8 ] ) { let mut dec = Decoder :: from ( payload ) ; assert_eq ! ( dec decode_byte ( ) unwrap ( ) 0x80 0x80 " " ) ; assert_eq ! ( dec decode_uint ( 4 ) unwrap ( ) 0 ) ; dec . skip_vec ( 1 ) ; // DCID dec . skip_vec ( 1 ) ; // SCID assert_eq ! ( dec remaining ( ) 4 0 ) ; }
Simple checks for a Version Negotiation packet.
Simple checks for a Version Negotiation packet .
payload
&[u8]
panics
If this is clearly not a Version Negotiation packet.
If this is clearly not a Version Negotiation packet .