mirror of
https://github.com/nghttp2/nghttp2.git
synced 2025-12-10 03:58:53 +08:00
Refactor ALPN/NPN protocol selection and introduce NGHTTP2_PROTO_ALPN macro
This commit is contained in:
@@ -49,6 +49,24 @@ extern "C" {
|
||||
*/
|
||||
#define NGHTTP2_PROTO_VERSION_ID_LEN 5
|
||||
|
||||
/**
|
||||
* @macro
|
||||
*
|
||||
* The seriazlied form of ALPN protocol identifier this library
|
||||
* supports. Notice that first byte is the length of following
|
||||
* protocol identifier. This is the same wire format of `TLS ALPN
|
||||
* extension <https://tools.ietf.org/html/rfc7301>`_. This is useful
|
||||
* to process incoming ALPN tokens in wire format.
|
||||
*/
|
||||
#define NGHTTP2_PROTO_ALPN "\x5h2-14"
|
||||
|
||||
/**
|
||||
* @macro
|
||||
*
|
||||
* The length of :macro:`NGHTTP2_PROTO_ALPN`.
|
||||
*/
|
||||
#define NGHTTP2_PROTO_ALPN_LEN (sizeof(NGHTTP2_PROTO_ALPN) - 1)
|
||||
|
||||
/**
|
||||
* @macro
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user