ASAbstractFaspSession

@interface ASAbstractFaspSession

Abstract session class from which ASFaspSession and ASPersistentFaspSession are derived. In practice use one of those classes

  • Session UUID. This UUID is created with the session is created and never changes

    Declaration

    Objective-C

    @property (readonly, nonatomic, nonnull) int *uuid;

    Swift

    var uuid: UnsafeMutablePointer
  • Parameters with which the session was created

    Declaration

    Objective-C

    @property (readonly, nonatomic, nonnull) ASFaspSessionParameters *parameters;

    Swift

    var parameters: ASFaspSessionParameters { get }
  • Array of ASFaspSessionDelegate instances which will receive delegate method calls for this session

    Declaration

    Objective-C

    @property (nonatomic, readonly, strong, nonnull) NSMutableArray *delegates
  • Current target rate of the session. Initially this equals the value of the initialTargetRate attribute of the ASFaspSessionParameters instance the session was created with. It may be changed using setTargetRate

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) unsigned long long targetRate;

    Swift

    var targetRate: UInt64 { get set }
  • Session transfer statistics

    Declaration

    Objective-C

    @property (readwrite, strong, nonatomic, nullable) ASFaspSessionStats *stats;

    Swift

    var stats: ASFaspSessionStats? { get set }
  • Contains the last error experienced by the session or nil if no error occurred

    Declaration

    Objective-C

    @property (nonatomic, strong, nullable) NSError *lastError
  • A dictionary that may be used to store custom information with the session.

    Declaration

    Objective-C

    @property (nonatomic, readonly, strong, nonnull) NSMutableDictionary *userInfo
  • Start a session synchronously (this method will block until the session terminates)

    Declaration

    Objective-C

    - (void)start;

    Swift

    func start()
  • Start a session asynchronously (this method returns immediately and the session runs in the background)

    Declaration

    Objective-C

    - (void)startAsync;

    Swift

    func startAsync()
  • Start a session asynchronously with a session end block. The end block should accept an ASAbstractFaspSession as its first argument and a ASFaspSessionState as its second argument. The meaning of the finalState parameter is the same as for the -[ASFaspSessionDelegate sessionDidEnd:state:] delegate callback.

    Declaration

    Objective-C

    - (void)startAsyncWithSessionEnd:(nullable ASFaspSessionEndBlock)endBlock;

    Swift

    func startAsyncWithSessionEnd(endBlock: ASFaspSessionEndBlock?)
  • Stop the session. This method does not block and returns immediately. The session will continue for a short time and then stop. If this method is called too early in a session’s lifetime or when a session is not running, it has no effect and returns NO. Otherwise it causes the session to stop and returns YES.

    Declaration

    Objective-C

    - (id)stop;

    Swift

    func stop() -> AnyObject!