OxL Reference

method TlsStream.alpn

The negotiated ALPN protocol ("h2", "http/1.1"), or "" when none was negotiated.

Example:

oxl✓ checked in CI
use std.net { TlsStream }

fn proto(s: &TlsStream) -> bool {
  s.alpn() == "h2"
}
pub(api) fn alpn() -> str

Since. 1.0.0-beta

Returns

str

Effects

none declared (pure unless the body says otherwise)

Defined in: std/net/tls.oxl:350

See also