Function

SSLGetDatagramWriteSize

Provides the largest packet that the OS guarantees it can send without fragmentation.

Declaration

OSStatus SSLGetDatagramWriteSize(SSLContextRef dtlsContext, size_t *bufSize);

Parameters

dtlsContext

The SSL context associated with the connection.

bufSize

The address of a size_t integer for storing the length.

Return Value

A result code. See Secure Transport Result Codes.

Discussion

Although any packet below this threshold size will not be fragmented by the OS when sent using SSLWrite, this function provides no guarantees about whether the packet will be fragmented by routers en route. This size value is equal to the maximum Datagram Record size (set by calling SSLSetMaxDatagramRecordSize) minus the DTLS Record header size.

See Also

Write Operations

SSLWrite

Performs a typical application-level write operation.

SSLGetMaxDatagramRecordSize

Obtains the maximum datagram record size allowed by the application for a given context.

SSLSetMaxDatagramRecordSize

Sets the maximum datagram record size allowed by the application for a given context.

SSLSetDatagramHelloCookie

Sets the cookie value used in the Datagram Transport Layer Security (DTLS) hello message.