TlsSession
class TlsSession
This class represents a TLS session. It manages the context for the session, which is used for input as well as output streams.
-
The TLS context.
Declaration
Swift
let context: SSLContext
-
The session delegates.
Declaration
Swift
var delegates: [TlsSessionDelegate]
-
Initializes a TLS session for a given target and stream.
Note
Default App Transport Security (ATS) settings are used. The ATS settings cannot be configured in the app’s information property list (
Info.plist
).Declaration
Swift
init?(forTarget target: Target, withStream stream: PairedStream)
Parameters
target
The target for the TLS session.
stream
The TCP stream to the target.
-
Destroys a TLS session.
Declaration
Swift
deinit
-
The state of the TLS session.
Declaration
Swift
var state: SSLSessionState { get }
-
This function is called when there is space available for the handshake. When called it will initiate a TLS handshake or send additional data in order to complete the handshake (it is a two-way process).
Declaration
Swift
func spaceAvailableForHandshake()
-
This function is called when there are bytes available for the handshake.
Declaration
Swift
func bytesAvailableForHandshake()