You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When implementing a backwards-compatible protocol, one wants to assign different ALPNs to different protocol versions.
Examples:
http/0.9, http/1.0, http/1.1, h2 and h3
iroh-blobs/4, eventually iroh-blobs/5
It's important to indicate which versions you support, and often is the case that you indicate multiple versions simultaneously. E.g. sending an HTTP request using ["http/1.1", "h2", "h3"] as the ALPNs.
We currently don't have a way of specifying multiple ALPNs when doing an Endpoint::connect.
On the server side, you usually configure an ordered list of ALPNs and it chooses the first matching one. This is described in RFC 7301:
It is expected that a server will have a list of protocols that it supports, in preference order, and will only select a protocol if the client supports it. In that case, the server SHOULD select the most highly preferred protocol that it supports and that is also advertised by the client.
This manifests itself in APIs like that of rustls, its docs write:
The server can specify supported ALPN protocols by setting ServerConfig::alpn_protocols. During the handshake, the server will select the first protocol configured that the client supports.
The docs for ServerConfig::alpn_protocols say:
Protocol names we support, most preferred first.
The text was updated successfully, but these errors were encountered:
When implementing a backwards-compatible protocol, one wants to assign different ALPNs to different protocol versions.
Examples:
http/0.9
,http/1.0
,http/1.1
,h2
andh3
iroh-blobs/4
, eventuallyiroh-blobs/5
It's important to indicate which versions you support, and often is the case that you indicate multiple versions simultaneously. E.g. sending an HTTP request using
["http/1.1", "h2", "h3"]
as the ALPNs.We currently don't have a way of specifying multiple ALPNs when doing an
Endpoint::connect
.On the server side, you usually configure an ordered list of ALPNs and it chooses the first matching one. This is described in RFC 7301:
This manifests itself in APIs like that of rustls, its docs write:
The docs for
ServerConfig::alpn_protocols
say:The text was updated successfully, but these errors were encountered: