mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2026-04-15 02:32:57 +02:00
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:
parent
cca9245416
commit
d3ad730d5f
@ -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 */
|
||||
|
||||
/*
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user