File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -13,13 +13,16 @@ impl Protocol {
13
13
pub const WEB_TRANSPORT : Protocol = Protocol ( ProtocolInner :: WebTransport ) ;
14
14
/// RFC 9298 protocol
15
15
pub const CONNECT_UDP : Protocol = Protocol ( ProtocolInner :: ConnectUdp ) ;
16
+ /// RFC 9484 protocol
17
+ pub const CONNECT_IP : Protocol = Protocol ( ProtocolInner :: ConnectIp ) ;
16
18
17
19
/// Return a &str representation of the `:protocol` pseudo-header value
18
20
#[ inline]
19
21
pub fn as_str ( & self ) -> & str {
20
22
match self . 0 {
21
23
ProtocolInner :: WebTransport => "webtransport" ,
22
24
ProtocolInner :: ConnectUdp => "connect-udp" ,
25
+ ProtocolInner :: ConnectIp => "connect-ip" ,
23
26
}
24
27
}
25
28
}
@@ -28,6 +31,7 @@ impl Protocol {
28
31
enum ProtocolInner {
29
32
WebTransport ,
30
33
ConnectUdp ,
34
+ ConnectIp ,
31
35
}
32
36
33
37
/// Error when parsing the protocol
@@ -40,6 +44,7 @@ impl FromStr for Protocol {
40
44
match s {
41
45
"webtransport" => Ok ( Self ( ProtocolInner :: WebTransport ) ) ,
42
46
"connect-udp" => Ok ( Self ( ProtocolInner :: ConnectUdp ) ) ,
47
+ "connect-ip" => Ok ( Self ( ProtocolInner :: ConnectIp ) ) ,
43
48
_ => Err ( InvalidProtocol ) ,
44
49
}
45
50
}
You can’t perform that action at this time.
0 commit comments