boost::corosio::tls_context::set_alpn
Set the ALPN protocol list.
Synopsis
Declared in <boost/corosio/tls_context.hpp>
std::error_code
set_alpn(std::initializer_list<std::string_view> protocols);
Description
Configures Application‐Layer Protocol Negotiation (ALPN) for the connection. ALPN is used to negotiate which application protocol to use over the TLS connection (e.g., "h2" for HTTP/2, "http/1.1" for HTTP/1.1).
The protocols are tried in preference order (first = highest).
Parameters
| Name | Description |
|---|---|
protocols |
Ordered list of protocol identifiers. |
Created with MrDocs