SslTransport Type

Record fields

Record Field Description

acceptSocket

Full Usage: acceptSocket

Field type: Socket
Modifiers: mutable
Field type: Socket

negotiatedApplicationProtocol

Full Usage: negotiatedApplicationProtocol

Field type: SslApplicationProtocol
Modifiers: mutable

The ALPN protocol negotiated during the TLS handshake. When ALPN was not used (or the client did not advertise a known protocol), this is `SslApplicationProtocol()` (i.e. its `Protocol` byte sequence is empty). Callers may inspect this after `AuthenticateAsServerAsync` completes to dispatch to an HTTP/2 reader for "h2", or fall back to HTTP/1.1 otherwise.

Field type: SslApplicationProtocol

networkStream

Full Usage: networkStream

Field type: NetworkStream
Modifiers: mutable
Field type: NetworkStream

sslStream

Full Usage: sslStream

Field type: SslStream
Modifiers: mutable
Field type: SslStream

Constructors

Constructor Description

SslTransport(listenSocket, certificate, cancellationToken)

Full Usage: SslTransport(listenSocket, certificate, cancellationToken)

Parameters:
Returns: SslTransport
listenSocket : Socket
certificate : X509Certificate
cancellationToken : CancellationToken
Returns: SslTransport

Instance members

Instance member Description

this.accept ()

Full Usage: this.accept ()

Returns: Task<Result<SocketBinding, Error>>
Returns: Task<Result<SocketBinding, Error>>

this.readInternal buf

Full Usage: this.readInternal buf

Parameters:
Returns: ValueTask<int>
buf : ByteSegment
Returns: ValueTask<int>

this.shutdown ()

Full Usage: this.shutdown ()

this.writeInternal buf

Full Usage: this.writeInternal buf

Parameters:
Returns: ValueTask
buf : ByteSegment
Returns: ValueTask

Static members

Static member Description

SslTransport.buildServerAuthenticationOptions (certificate, checkCertificateRevocation)

Full Usage: SslTransport.buildServerAuthenticationOptions (certificate, checkCertificateRevocation)

Parameters:
Returns: SslServerAuthenticationOptions

Build the server authentication options used for every TLS handshake on this transport. Centralised so the inline handshake in `Tcp.runAcceptor` and `SslTransport.accept` stay in sync.

certificate : X509Certificate
checkCertificateRevocation : bool
Returns: SslServerAuthenticationOptions