pub fn detect_protocol(data: &[u8]) -> ProtocolExpand description
Detect whether raw bytes look like HTTP/1.x or HTTP/2 traffic.
Checks for the HTTP/2 connection preface, HTTP/2 frame headers,
and HTTP/1.x request/response patterns. Returns Protocol::Unknown
if no pattern matches.