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:
parent
1ecf2e9bab
commit
bdd5e58179
@ -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 */
|
#endif /* _HAPROXY_SERVER_H */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user