Closed xpepermint closed 3 years ago
@Momannn when this is merged you'll be able to get the selected ALPN protocol like this:
use rustls::{Session}; // don't forget this
...
connector.connect("google.com", tcp_stream).await?;
socket.session.get_alpn_protocol();
Also waiting for this feature.
I personally need to set some stuff about the session, eg.
session.set_buffer_limit(1_000_000);
Status?
As stated on other places on this tracker, I don't want to expose rusttls types directly. async-tls
is rather intended to implement high-level operations on TLS connections rather than having users implement those themselves. It's also intended to be engine-independent.
I know I'm far away from this goal, as I was sidelined, which is the reason why I put a maintenance notice out, showing a path to a structured handover to new maintainers. It's important to me though that the above design is taken over along with it.
Some very important data provided by
Session
are currently hidden (e.g. which protocol was selected by the handshake).Ref: https://github.com/async-rs/async-tls/issues/30