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() -> strС версии. 1.0.0-beta
Возвращает
str
Эффекты
не объявлены (чистая, пока тело не говорит иное)
Определено в: std/net/tls.oxl:350