Type Alias

SSLWriteFunc

A pointer to a customized write function that secure transport calls to write data to the connection.

Declaration

typedef OSStatus (*SSLWriteFunc)(SSLConnectionRef connection, const void *data, size_t *dataLength);

Parameters

connection

The SSL session connection reference.

data

A pointer to the data to write to the connection.You must allocate this memory before calling this function.

dataLength

Before calling, an integer representing the length of the data in bytes. On return, this is the number of bytes actually transferred.

Return Value

A result code. See Secure Transport Result Codes.

Discussion

Before using the secure transport API, you must write the functions SSLReadFunc and SSLWriteFunc and provide them to the library by calling the SSLSetIOFuncs function.

You may configure the underlying connection to operate in a non-blocking manner. In that case, a write operation may well return errSSLWouldBlock, indicating less data than requested was transferred and nothing is wrong except that the requested I/O hasn’t completed. This result is returned to the caller from the functions SSLRead, SSLWrite, or SSLHandshake.

See Also

Context Callbacks

SSLSetIOFuncs

Specifies callback functions that perform the network I/O operations.

Deprecated
SSLReadFunc

A pointer to a customized read function that secure transport calls to read data from the connection.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software