method TlsStream.alpn
The negotiated ALPN protocol ("h2", "http/1.1"), or "" when none was negotiated.
Example:
use std.net { TlsStream }
fn proto(s: &TlsStream) -> bool {
s.alpn() == "h2"
}pub(api) fn alpn() -> strSince. 1.0.0-beta
Returns
str
Effects
none declared (pure unless the body says otherwise)
Defined in: std/net/tls.oxl:350