Skip to content

Get protocol after handshake #30

@MoMannn

Description

@MoMannn

I was able to get this up and running but I cannot find a way to get which alpn protocol was decided (lets say server supports both http2 and http1.1 on alpn). Underlying ServerSession of rustls supports this but it is private trough TlsStream or acceptor. What is the correct way to access it?

Activity

xpepermint

xpepermint commented on Oct 5, 2020

@xpepermint
pub struct TlsStream<IO> {
    pub(crate) io: IO,
    pub(crate) session: ServerSession,
    pub(crate) state: TlsState,
}

Looks like session should be pub to access this information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @xpepermint@MoMannn

        Issue actions

          Get protocol after handshake · Issue #30 · async-rs/async-tls