Diffusion Apple API  6.10.2
Unified Client Library for iOS, tvOS and OS X / macOS
 All Classes Files Functions Variables Enumerations Enumerator Properties Pages
Class Methods | Properties | Instance Methods | List of all members
PTDiffusionSessionState Class Reference

Introduction

Session state represents the condition a session has in respect of connectivity to a Diffusion server.

A session state object is immutable.

See Also
PTDiffusionSessionStateChange
Since
5.6
Inheritance diagram for PTDiffusionSessionState:

Class Methods

(instancetype) + ClosedByClient
 
(instancetype) + ClosedByServer
 
(instancetype) + ClosedFailed
 
(instancetype) + ConnectedActive
 
(instancetype) + Connecting
 
(instancetype) + RecoveringReconnect
 

Properties

BOOL connected
 
BOOL recovering
 
BOOL closed
 
NSError * error
 

Instance Methods

(BOOL) - isEqualToSessionState:
 

Method Documentation

+ (instancetype) ClosedByClient

The session has been closed by the client.

Since
6.10
+ (instancetype) ClosedByServer

The session has been closed (or rejected) by the server.

Since
6.10
+ (instancetype) ClosedFailed

The session has lost its connection to a server and could not be recovered.

Since
6.10
+ (instancetype) ConnectedActive

An active connection with the server has been established.

Since
6.10
+ (instancetype) Connecting

The session is establishing its initial connection.

Since
6.10
- (BOOL) isEqualToSessionState: (nullable PTDiffusionSessionState *)  sessionState

Compares the receiver to the given session state.

Parameters
sessionStateThe session state object with which to compare the receiver.
Returns
YES if the given session state is equal to the receiver, otherwise NO.
Since
5.6
+ (instancetype) RecoveringReconnect

Connection with a server has been lost and the session is attempting reconnection.

Since
6.10

Property Documentation

- (BOOL) closed
readnonatomicassign

YES if the session is closed, otherwise NO.

This might mean that the session lost its connection to the server and could not be recovered.

Since
5.6
- (BOOL) connected
readnonatomicassign

YES if the session has an active connection to the server, otherwise NO.

Since
5.6
- (NSError*) error
readnonatomicassign

If the session is closed then this property will be nil if the closure was normal and expected, otherwise it will contain the failure reason.

Note
This property is to be considered as an auxiliary, informational attachment to this session state instance. As such it is not incorporated within the result of the hash method and is not checked on calls to isEqual: or isEqualToSessionState:.
Since
5.9
- (BOOL) recovering
readnonatomicassign

YES if the session is in the process of attempting reconnection to the server, otherwise NO.

Since
5.6