One Logo Pool Ball
Network · IOS API REFERENCE

DTLS

struct · iOS 27.0+ · SDK 27.1

struct DTLS

The system definition of the Datagram Transport Layer Security (DTLS) protocol. Supports sending and receiving encrypted byte datagrams.

Members (9)

method · iOS 27.0+

cipherSuites

TypeScript
cipherSuites(suites: Array<_Security_tls_ciphersuite_t>): DTLS
Swift declaration
func cipherSuites(_ suites: [tls_ciphersuite_t]) -> DTLS

Set DTLS ciphersuites to the set of enabled ciphersuites. - Parameter suites: The cipher suites to set.

method · iOS 27.0+

localIdentity

TypeScript
localIdentity(identity: Implements<_Security_OS_sec_identity> | SDKHandle): DTLS
Swift declaration
func localIdentity(_ identity: sec_identity_t) -> DTLS

Set the local identity DTLS uses during the handshake. - Parameter identity: The local identity to be used during the DTLS handshake.

method · iOS 27.0+

ticketsEnabled

TypeScript
ticketsEnabled(enabled: boolean): DTLS
Swift declaration
func ticketsEnabled(_ enabled: Bool) -> DTLS

Enable DTLS session ticket support. - Parameter enabled: True if enabled, false otherwise.

method · iOS 27.0+

earlyDataEnabled

TypeScript
earlyDataEnabled(enabled: boolean): DTLS
Swift declaration
func earlyDataEnabled(_ enabled: Bool) -> DTLS

Enable early data (0-RTT) for DTLS. > Warning: This may have security implications for application data. In particular, DTLS early data is replayable by a network attacker. You must account for this when sending data before the handshake is confirmed. See RFC 8446 for more information. You MUST NOT enable fast open without a specific application profile that defines its use. - Parameter enabled: True to enable early data, false otherwise.

method · iOS 27.0+

cipherSuiteGroups

TypeScript
cipherSuiteGroups(groups: Array<_Security_tls_ciphersuite_group_t>): DTLS
Swift declaration
func cipherSuiteGroups(_ groups: [tls_ciphersuite_group_t]) -> DTLS

Set DTLS ciphersuite groups to the set of enabled ciphersuites. - Parameter groups: The cipher suite groups to set.

method · iOS 27.0+

peerAuthentication

TypeScript
peerAuthentication(preference: DTLS_PeerAuthentication): DTLS
Swift declaration
func peerAuthentication(_ preference: DTLS.PeerAuthentication) -> DTLS

Specify a preference for how to authenticate the peer. - Parameter preference: The peer authentication preference.

method · iOS 27.0+

applicationProtocols

TypeScript
applicationProtocols(protocols: Array<string>): DTLS
Swift declaration
func applicationProtocols(_ protocols: [String]) -> DTLS

Set application protocols supported by clients of this protocol. Application layer protocol negotiation (ALPN) tokens describe the application protocol in use above DTLS. - Parameters protocols: An array of application layer protocol tokens to use for negotiation during the DTLS handshake.

method · iOS 27.0+

version

TypeScript
version(min?: (_Security_tls_protocol_version_t) | null, max?: (_Security_tls_protocol_version_t) | null): DTLS
Swift declaration
func version(min: tls_protocol_version_t? = nil, max: tls_protocol_version_t? = nil) -> DTLS
init · iOS 27.0+

init

TypeScript
static init(): DTLS
Swift declaration
init()

Create a DTLS protocol to use in a protocol stack.

Skipped declarations

2 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.

DTLS.init(_:)

callback cannot propagate synchronous failure

DTLS.certificateValidator(_:)

This Swift callback must itself suspend asynchronously. (nonthrowing, so a rejected promise cannot reach swift)

All Network types →