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 *delegatesSwift
var delegates: UnsafeMutablePointer<Int32> { get } -
targetRate is deprecated, please use targetRateKbps instead. Be sure to switch from bps to kbps
Declaration
Objective-C
@property (readonly, nonatomic) unsigned long long targetRate;Swift
var targetRate: UInt64 { get } -
Current target rate of the session in kbps (1kbps = 1000 bps). Initially this equals the value of the initialTargetRateKbps attribute of the ASFaspSessionParameters instance the session was created with. It may be changed using setTargetRateKbps
Declaration
Objective-C
@property (assign, readwrite, nonatomic) unsigned long long targetRateKbps;Swift
var targetRateKbps: 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 *lastErrorSwift
var lastError: UnsafeMutablePointer<Int32>? { get set } -
A dictionary that may be used to store custom information with the session.
Declaration
Objective-C
@property (nonatomic, readonly, strong, nonnull) NSMutableDictionary *userInfoSwift
var userInfo: UnsafeMutablePointer<Int32> { get } -
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 startAsync(sessionEnd endBlock: ASFaspSessionEndBlock? = nil) -
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() -> Any!
ASAbstractFaspSession Class Reference