SSLWrite(_:_:_:_:)
Performs a typical application-level write operation.
Declaration
func SSLWrite(_ context: SSLContext, _ data: UnsafeRawPointer?, _ dataLength: Int, _ processed: UnsafeMutablePointer<Int>) -> OSStatusParameters
- context:
An SSL session context reference.
- data:
A pointer to the buffer of data to write.
- dataLength:
The amount, in bytes, of data to write.
- processed:
On return, the length, in bytes, of the data actually written.
Mentioned in
Return Value
A result code. See Secure Transport Result Codes.
Discussion
The SSLWrite(_:_:_:_:) function might call the SSLWriteFunc function that you provide (see SSLSetIOFuncs(_:_:_:)). Because you may configure the underlying connection to operate in a no-blocking manner, a write operation might return errSSLWouldBlock, indicating that less data than requested was actually transferred. In this case, you should repeat the call to SSLWrite(_:_:_:_:) until some other result is returned.