MINOR: server: implement helper to identify QUIC servers

Define srv_is_quic() which can be used to quickly identified if a server
uses QUIC protocol.
This commit is contained in:
Amaury Denoyelle 2025-06-11 17:28:46 +02:00
parent 1ecf2e9bab
commit bdd5e58179

View File

@ -343,6 +343,16 @@ static inline void srv_detach(struct server *srv)
}
}
static inline int srv_is_quic(const struct server *srv)
{
#ifdef USE_QUIC
return srv->addr_type.proto_type == PROTO_TYPE_DGRAM &&
srv->addr_type.xprt_type == PROTO_TYPE_STREAM;
#else
return 0;
#endif
}
#endif /* _HAPROXY_SERVER_H */
/*