Implement the extended CONNECT protocol from RFC 8441 (#565)

This commit is contained in:
Anthony Ramine
2021-11-24 10:05:10 +01:00
committed by GitHub
parent dbaa3a4285
commit 87969c1f29
22 changed files with 694 additions and 120 deletions

View File

@@ -47,6 +47,16 @@ macro_rules! assert_settings {
}};
}
#[macro_export]
macro_rules! assert_go_away {
($frame:expr) => {{
match $frame {
h2::frame::Frame::GoAway(v) => v,
f => panic!("expected GO_AWAY; actual={:?}", f),
}
}};
}
#[macro_export]
macro_rules! poll_err {
($transport:expr) => {{
@@ -80,6 +90,7 @@ macro_rules! assert_default_settings {
use h2::frame::Frame;
#[track_caller]
pub fn assert_frame_eq<T: Into<Frame>, U: Into<Frame>>(t: T, u: U) {
let actual: Frame = t.into();
let expected: Frame = u.into();