MINOR: protocols: Add a new proto_is_quic() function

Add a new function, proto_is_quic(), that returns true if the protocol
is QUIC (using a datagram socket but provides a stream transport).
This commit is contained in:
Olivier Houchard 2026-03-19 15:36:25 +01:00 committed by Olivier Houchard
parent cca9245416
commit d3ad730d5f

View File

@ -124,6 +124,12 @@ static inline int real_family(int ss_family)
return fam ? fam->real_family : AF_UNSPEC;
}
static inline int proto_is_quic(const struct protocol *proto)
{
return (proto->proto_type == PROTO_TYPE_DGRAM &&
proto->xprt_type == PROTO_TYPE_STREAM);
}
#endif /* _HAPROXY_PROTOCOL_H */
/*