Diffusion Apple API
5.9.24
Unified Client Library for iOS, OS X and tvOS
|
A session configuration defines behavior and policies to use when connecting to Diffusion.
Class Methods | |
(NSTimeInterval) | + defaultConnectionTimeout |
Properties | |
NSString * | principal |
PTDiffusionCredentials * | credentials |
id < PTDiffusionSessionErrorHandler > | errorHandler |
NSNumber * | reconnectionTimeout |
id < PTDiffusionSessionReconnectionStrategy > | reconnectionStrategy |
NSTimeInterval | connectionTimeout |
NSDictionary * | sslOptions |
Instance Methods | |
(instancetype) | - initWithPrincipal:credentials: |
(BOOL) | - isEqualToSessionConfiguration: |
+ (NSTimeInterval) defaultConnectionTimeout |
The default connection timeout (2 seconds).
- (instancetype) initWithPrincipal: | (nullable NSString *) | principal | |
credentials: | (nullable PTDiffusionCredentials *) | credentials | |
Returns a session configuration object initialized with the given principal and credentials.
principal | The security principal to use when opening the session. A value of nil dictates that no principal name will be associated with the session, indicating anonymous authentication. |
credentials | The security credentials to use when opening the session. A value of nil dictates that no credentials will be used when authenticating the session. |
- (BOOL) isEqualToSessionConfiguration: | (nullable PTDiffusionSessionConfiguration *) | sessionConfiguration |
Compares the receiver to the given session configuration.
sessionConfiguration | The session configuration object with which to compare the receiver. |
YES
if the receiver and the given session configuration will have the same effect.
|
readnonatomicassign |
The connection timeout.
This constrains the time taken to establish an initial connection to the server. The server is responsible for limiting the overall time taken to complete a connection once it has received the request.
|
readnonatomiccopy |
The security credentials to use when opening the session.
A value of nil
dictates that no credentials will be used when authenticating the session.
|
readnonatomicassign |
The error handler to be used once the session has been opened and after the open completion handler has been called.
A value of nil
dictates that the default error handler will be employed.
error
property on PTDiffusionSessionState.
|
readnonatomiccopy |
The security principal to use when opening the session.
A value of nil
dictates that no principal name will be associated with the session, indicating anonymous authentication.
|
readnonatomicassign |
The reconnection strategy that will be used on connection failure.
A value of nil
when a valid reconnectionTimeout has been set dictates that the default reconnection strategy will be employed.
|
readnonatomicassign |
The reconnection timeout in seconds that will be used on connection failure.
The reconnection timeout boxed by this number is accessed as a double representing an NSTimeInterval.
A value of nil
or a negative boxed value both dictate that reconnection will be disabled.
|
readnonatomiccopy |
Security settings to be applied to the underlying transport streams for SSL/TLS encrypted connections.
A value of nil
or an empty dictionary indicates that default settings, as defined by the host operating system, will be applied.
Supported keys are documented by Apple under 'CFStream Property SSL Settings Constants' in their Core Foundation CFStream Reference.
For example, a rudimentary approach to allowing otherwise disallowed self-signed certificates could be to disable validation of the certificate chain entirely:
configuration.sslOptions = [NSDictionary dictionaryWithObject:kCFBooleanFalse forKey:kCFStreamSSLValidatesCertificateChain];