- iOS 5.0+
- macOS 10.9+
- Mac Catalyst 13.0+
- tvOS 9.0+
SSLContextRef object used for read and write operations on a stream.
Before opening a stream, you can copy the object from this property and configure it using the Secure Transport API. You can also set this property to specify a new
SSLContextRef for a stream. The behavior depends on whether the stream has been opened and on whether an SSL context is associated with the stream, as follows:
If the stream has not been opened, the specified object replaces any existing context, and is used in the initial stream handshake when the connection is opened.
If the stream has been opened without SSL enabled, setting this property initiates an SSL handshake over the existing socket.
After the initial SSL handshake occurs, changing the context object is unsupported.
If an SSL settings dictionary is set for the
kCFStreamPropertySSLSettings key, an
SSLContextRef object is created internally and configured based on that dictionary. However, if an
SSLContextRef object is set afterwards, its configuration takes precedence over the previously configured context.
HTTP Final Request property. A value of type CFHTTPMessage containing the final message transmitted by the stream after all modifications (including authentication, connection policy, redirects, and so on) have been made. This property cannot be set.
HTTP Final URL property. A value of type CFURL containing the final HTTP URL. This value differs from the URL in the original HTTP request if an autoredirection occurred. This property cannot be set.
HTTP Should Auto Redirect property. Set this property to
kCFBooleanTrue to enable autoredirection; set this property to
kCFBooleanFalse to disable autoredirection.
FTP File Transfer Offset stream property key for set and copy operations. The value of this property is a CFNumber of type
kCFNumberLongLongType representing the file offset at which to start the transfer.
FTP Password stream property key for set and copy operations. A value of type CFString for storing the login password. Don’t set this property when anonymous FTP is desired.
FTP Proxy stream property key for set and copy operations. The property is a value of type CFDictionary that holds proxy dictionary key-value pairs. The dictionary returned by SystemConfiguration can also be set as the value of this property.
FTP Resource Size read stream property key copy operations. This property stores a CFNumber of type
kCFNumberLongLongType representing the size of a resource in bytes.
FTP Passive Mode stream property key for set and copy operations. Set this property to
kCFBooleanTrue to enable passive mode; set this property to
kCFBooleanFalse to disable passive mode.
FTP User Name stream property key for set and copy operations. A value of type CFString for storing the login user name. Don’t set this property when anonymous FTP is desired.
This function gets error codes in the
kCFStreamErrorDomainSOCKS domain from the
CFStreamError returned by a stream operation.
The type of service for the stream. Providing the service type allows the system to properly handle certain attributes of the stream, including routing and suspension behavior. Most streams do not need to set this property. See Stream Service Types for a list of possible values.
When running CFNetwork code on Windows, this domain returns error codes associated with the underlying TCP/IP stack. You should also note that non-networking errors such as
ENOMEM are delivered through the POSIX domain. See the header
winsock2.h for relevant error codes.
A boolean value indicating whether the stream is connected over a cellular (WWAN) interface. This is a read-only property, and is
false until the connection has been established.
A Boolean value indicating that the connection should not be established over a cellular (WWAN) connection. This value can only be set before you open the stream.
SSL Peer Trust property key for copy operations, which return a
SecTrustRef object containing the result of the SSL handshake.
Security property key whose value is a CFArray of SecCertificateRefs except for the first element in the array, which is a SecIdentityRef.
Security property key whose value indicates whether the connection is to act as a server in the SSL process.
Security property key whose value specifies the stream’s security level.
Security property key whose value overrides the name used for certificate verification.