Tls module

alpn_protocol

procedureextensionexperimentalSource

The ALPN protocol both sides chose ("" when none was).

Example↗
uses_http2 :: (stream: *Tls_Stream) -> bool {
    return alpn_protocol(stream) == "h2";
}

This one is only checked to compile, not run.

alpn_protocol :: (stream: *Tls_Stream) -> string

The ALPN protocol both sides chose ("" when none was).

Parameters

stream: *Tls_Stream
an established stream.

Returns

string
Example↗
uses_http2 :: (stream: *Tls_Stream) -> bool {
    return alpn_protocol(stream) == "h2";
}

This one is only checked to compile, not run.

See also