Specifies an I/O connection for a specific session.
- iOS 5.0+
- macOS 10.2+
- tvOS 9.0+
- watchOS 2.0+
An SSL session context reference.
A result code. See Secure Transport Result Codes.
You must establish a connection before creating a secure session. After calling the
SSLCreate function to create an SSL session context, you call the
SSLSet function to specify the connection to which the context applies. You specify a value in the
connection parameter that your callback routines can use to identify the connection. This value might be a pointer to a socket (if you are using the Sockets API) or an endpoint (if you are using Open Transport). For example, you might create a socket, start a connection on it, create a context reference, cast the socket to an
SSLConnection, and then pass both the context reference and connection reference to the
Note that the Sockets API is the preferred networking interface for new development.
On the client side, it’s assumed that communication has been established with the desired server on this connection. On the server side, it’s assumed that a connection has been established in response to an incoming client request .
This function must be called prior to the
SSLHandshake function; consequently, this function can be called only when no session is active.