ARTRealtimeInternal
Objective-C
@interface ARTRealtimeInternal : NSObject
#endif
- (instancetype)init NS_UNAVAILABLE;
- (instancetype)initWithOptions:(ARTClientOptions *)options;
- (instancetype)initWithKey:(NSString *)key;
- (instancetype)initWithToken:(NSString *)token;
@property (nonatomic, readonly) ARTConnectionInternal *connection;
@property (nonatomic, readonly) ARTRealtimeChannelsInternal *channels;
@property (readonly) ARTAuthInternal *auth;
@property (readonly) ARTPushInternal *push;
#if TARGET_OS_IOS
@property (nonnull, nonatomic, readonly, getter=device) ARTLocalDevice *device;
#endif
@property (readonly, nullable, getter=clientId) NSString *clientId;
@property (readonly, nonatomic) dispatch_queue_t queue;
/// The `connectionDetails` from the latest `CONNECTED` `ProtocolMessage` that we received (`nil` if it did not contain a `connectionDetails`).
///
/// Provides the implementation for `-[ARTPluginAPI nosync_latestConnectionDetailsForClient:]`. See documentation for that method in `APPluginAPIProtocol`.
@property (nullable, readonly, nonatomic) ARTConnectionDetails *latestConnectionDetails;
- (void)timeWithWrapperSDKAgents:(nullable NSStringDictionary *)wrapperSDKAgents
completion:(ARTDateTimeCallback)callback;
- (BOOL)request:(NSString *)method
path:(NSString *)path
params:(nullable NSStringDictionary *)params
body:(nullable id)body
headers:(nullable NSStringDictionary *)headers
wrapperSDKAgents:(nullable NSStringDictionary *)wrapperSDKAgents
callback:(ARTHTTPPaginatedCallback)callback
error:(NSError *_Nullable *_Nullable)errorPtr;
- (void)ping:(ARTCallback)cb;
- (BOOL)statsWithWrapperSDKAgents:(nullable NSStringDictionary *)wrapperSDKAgents
callback:(ARTPaginatedStatsCallback)callback;
- (BOOL)stats:(nullable ARTStatsQuery *)query wrapperSDKAgents:(nullable NSStringDictionary *)wrapperSDKAgents callback:(ARTPaginatedStatsCallback)callback error:(NSError *_Nullable *_Nullable)errorPtr;
- (void)connect;
- (void)close;
@end
Swift
class ARTRealtimeInternal : NSObject
Undocumented
-
Unavailable
Undocumented
Declaration
Objective-C
- (instancetype)init NS_UNAVAILABLE; -
Undocumented
Declaration
Objective-C
- (instancetype)initWithOptions:(ARTClientOptions *)options;Swift
init(options: ARTClientOptions) -
Undocumented
Declaration
Objective-C
- (instancetype)initWithKey:(NSString *)key;Swift
init(key: String) -
Undocumented
Declaration
Objective-C
- (instancetype)initWithToken:(NSString *)token;Swift
init(token: String) -
Undocumented
Declaration
Objective-C
@property (nonatomic, readonly) ARTConnectionInternal *connectionSwift
var connection: ARTConnectionInternal { get } -
Undocumented
Declaration
Objective-C
@property (nonatomic, readonly) ARTRealtimeChannelsInternal *channelsSwift
var channels: ARTRealtimeChannelsInternal { get } -
Undocumented
Declaration
Objective-C
@property (readonly) ARTAuthInternal *authSwift
var auth: ARTAuthInternal { get } -
Undocumented
Declaration
Objective-C
@property (readonly) ARTPushInternal *pushSwift
var push: ARTPushInternal { get } -
Undocumented
Declaration
Objective-C
@property (nonnull, nonatomic, readonly, getter=device) ARTLocalDevice *deviceSwift
var device: ARTLocalDevice { get } -
Undocumented
Declaration
Objective-C
@property (readonly, nullable, getter=clientId) NSString *clientIdSwift
var clientId: String? { get } -
Undocumented
Declaration
Objective-C
@property (readonly, nonatomic) dispatch_queue_t queueSwift
var queue: dispatch_queue_t { get } -
The
connectionDetailsfrom the latestCONNECTEDProtocolMessagethat we received (nilif it did not contain aconnectionDetails).Provides the implementation for
-[ARTPluginAPI nosync_latestConnectionDetailsForClient:]. See documentation for that method inAPPluginAPIProtocol.Declaration
Objective-C
@property (nonatomic, readonly, nullable) ARTConnectionDetails *latestConnectionDetails;Swift
var latestConnectionDetails: ARTConnectionDetails? { get } -
Undocumented
Declaration
Objective-C
- (void)timeWithWrapperSDKAgents:(nullable NSStringDictionary *)wrapperSDKAgents completion:(ARTDateTimeCallback)callback;Swift
func time(withWrapperSDKAgents wrapperSDKAgents: [String : String]?) async throws -> Date -
Undocumented
Declaration
Objective-C
- (BOOL)request:(NSString *)method path:(NSString *)path params:(nullable NSStringDictionary *)params body:(nullable id)body headers:(nullable NSStringDictionary *)headers wrapperSDKAgents:(nullable NSStringDictionary *)wrapperSDKAgents callback:(ARTHTTPPaginatedCallback)callback error:(NSError *_Nullable *_Nullable)errorPtr;Swift
func request(_ method: String, path: String, params: [String : String]?, body: Any?, headers: [String : String]?, wrapperSDKAgents: [String : String]?, callback: @escaping ARTHTTPPaginatedCallback) throws -
Undocumented
Declaration
Objective-C
- (void)ping:(ARTCallback)cb;Swift
func ping(_ cb: @escaping ARTCallback) -
Undocumented
Declaration
Objective-C
- (BOOL)statsWithWrapperSDKAgents:(nullable NSStringDictionary *)wrapperSDKAgents callback:(ARTPaginatedStatsCallback)callback;Swift
func stats(withWrapperSDKAgents wrapperSDKAgents: [String : String]?, callback: @escaping ARTPaginatedStatsCallback) -> Bool -
Undocumented
Declaration
Objective-C
- (BOOL)stats:(nullable ARTStatsQuery *)query wrapperSDKAgents:(nullable NSStringDictionary *)wrapperSDKAgents callback:(ARTPaginatedStatsCallback)callback error:(NSError *_Nullable *_Nullable)errorPtr;Swift
func stats(_ query: ARTStatsQuery?, wrapperSDKAgents: [String : String]?, callback: @escaping ARTPaginatedStatsCallback) throws -
Undocumented
Declaration
Objective-C
- (void)connect;Swift
func connect() -
Undocumented
Declaration
Objective-C
- (void)close;Swift
func close() -
Undocumented
Declaration
Objective-C
@property (readonly, nonatomic) ARTEventEmitter<ARTEvent *, ARTConnectionStateChange *> *internalEventEmitterSwift
var internalEventEmitter: ARTEventEmitter<ARTEvent, ARTConnectionStateChange> { get } -
Undocumented
Declaration
Objective-C
@property (readonly, nonatomic) ARTEventEmitter<ARTEvent *, NSNull *> *connectedEventEmitterSwift
var connectedEventEmitter: ARTEventEmitter<ARTEvent, NSNull> { get } -
Undocumented
Declaration
Objective-C
@property (readonly, nonatomic) NSMutableArray<void (^)(ARTRealtimeConnectionState, ARTErrorInfo *_Nullable)> *pendingAuthorizationsSwift
var pendingAuthorizations: NSMutableArray { get } -
Undocumented
Declaration
Objective-C
- (BOOL)shouldSendEvents;Swift
func shouldSendEvents() -> Bool -
Undocumented
Declaration
Objective-C
- (void)sendQueuedMessages;Swift
func sendQueuedMessages() -
Undocumented
Declaration
Objective-C
- (void)failQueuedMessages:(ARTStatus *)error;Swift
func failQueuedMessages(_ error: ARTStatus) -
Undocumented
Declaration
Objective-C
@property (nonatomic) ARTRestInternal *restSwift
var rest: ARTRestInternal { get set } -
Undocumented
Declaration
Objective-C
@property (readonly, nullable) id<ARTRealtimeTransport> transportSwift
var transport: (any ARTRealtimeTransport)? { get } -
Undocumented
Declaration
Objective-C
@property (readonly, nonatomic, nonnull) id<ARTReachability> reachabilitySwift
var reachability: any ARTReachability { get } -
Undocumented
Declaration
Objective-C
@property (nonatomic) NSTimeInterval connectionStateTtlSwift
var connectionStateTtl: TimeInterval { get set } -
Undocumented
Declaration
Objective-C
@property (nonatomic) NSTimeInterval maxIdleIntervalSwift
var maxIdleInterval: TimeInterval { get set } -
Current protocol
msgSerial. Starts at zero.Declaration
Objective-C
@property (nonatomic) int64_t msgSerial;Swift
var msgSerial: Int64 { get set } -
List of queued messages on a connection in the disconnected or connecting states.
Declaration
Objective-C
@property (nonatomic) NSMutableArray<ARTQueuedMessage *> *_Nonnull queuedMessages;Swift
var queuedMessages: NSMutableArray { get set } -
List of pending messages waiting for ACK/NACK action to confirm the success receipt and acceptance.
Declaration
Objective-C
@property (nonatomic) NSMutableArray<ARTPendingMessage *> *_Nonnull pendingMessages;Swift
var pendingMessages: NSMutableArray { get set } -
First
msgSerialpending message.Declaration
Objective-C
@property (nonatomic) int64_t pendingMessageStartSerial;Swift
var pendingMessageStartSerial: Int64 { get set } -
Client is trying to resume the last connection
Declaration
Objective-C
@property (nonatomic) BOOL resuming;Swift
var resuming: Bool { get set } -
Undocumented
Declaration
Objective-C
@property (readonly, getter=getClientOptions) ARTClientOptions *optionsSwift
var options: ARTClientOptions { get } -
Alter the behavior defined in RTN15a, that is trying to immediately reconnect after a disconnection
Declaration
Objective-C
@property (nonatomic) NSTimeInterval immediateReconnectionDelay;Swift
var immediateReconnectionDelay: TimeInterval { get set }
-
Undocumented
Declaration
Objective-C
- (BOOL)isActive;Swift
func isActive() -> Bool -
Undocumented
Declaration
Objective-C
- (void)onHeartbeat;Swift
func onHeartbeat() -
Undocumented
Declaration
Objective-C
- (void)onConnected:(ARTProtocolMessage *)message;Swift
func onConnected(_ message: ARTProtocolMessage) -
Undocumented
Declaration
Objective-C
- (void)onDisconnected;Swift
func onDisconnected() -
Undocumented
Declaration
Objective-C
- (void)onClosed;Swift
func onClosed() -
Undocumented
Declaration
Objective-C
- (void)onSuspended;Swift
func onSuspended() -
Undocumented
Declaration
Objective-C
- (void)onError:(ARTProtocolMessage *)message;Swift
func onError(_ message: ARTProtocolMessage) -
Undocumented
Declaration
Objective-C
- (void)onAck:(ARTProtocolMessage *)message;Swift
func onAck(_ message: ARTProtocolMessage) -
Undocumented
Declaration
Objective-C
- (void)onNack:(ARTProtocolMessage *)message;Swift
func onNack(_ message: ARTProtocolMessage) -
Undocumented
Declaration
Objective-C
- (void)onChannelMessage:(ARTProtocolMessage *)message;Swift
func onChannelMessage(_ message: ARTProtocolMessage) -
Undocumented
Declaration
Objective-C
- (void)setReachabilityClass:(Class _Nullable)reachabilityClass;Swift
func setReachabilityClass(_ reachabilityClass: AnyClass?) -
Undocumented
Declaration
Objective-C
- (void)transportReconnectWithExistingParameters;Swift
func transportReconnectWithExistingParameters() -
Submits a
ProtocolMessagefor delivery to Ably, with possible queueing and retries.Note that this method is used internally for various kinds of messages: those that do not require an
ACK(e.g.ATTACH), which should only be sent when they can be sent immediately, and those which require anACK(e.g.MESSAGE), which can be queued to be sent later. In the case of messages that require anACK, it implements the connection behaviour described in RTL6c (the RTL6c channel state checks must be performed separately by the channel).It behaves as follows:
- If the connection can send the message immediately, it will be sent immediately.
- If the connection cannot send the message immediately, then the behaviour depends on whether the message has an
actionthat expects to receive anACKfrom Ably:- If the message expects an
ACK, then this method follows the channel message publishing behaviour described in RTL6c:- If the connection can queue the message to be sent later, then it will accept the message per RTL6c2.
- If the connection cannot queue the message (due to some combination of connection state and the
queueMessagesclient option), then the callbacks will be immediately called with an error per RTL6c4.
- If the message does not expect an
ACK, then the message will be silently dropped (i.e. it is the responsibility of callers to not submit messages to the connection in this scenario).
- If the message expects an
Declaration
Objective-C
- (void)send:(nonnull ARTProtocolMessage *)msg sentCallback:(nullable ARTCallback)sentCallback ackCallback:(nullable ARTStatusCallback)ackCallback;Swift
func send(_ msg: ARTProtocolMessage, sentCallback: ARTCallback?, ackCallback: ARTStatusCallback? = nil) -
Undocumented
Declaration
Objective-C
- (void)send:(ARTProtocolMessage *)msg reuseMsgSerial:(BOOL)reuseMsgSerial sentCallback:(nullable ARTCallback)sentCallback ackCallback:(nullable ARTStatusCallback)ackCallback;Swift
func send(_ msg: ARTProtocolMessage, reuseMsgSerial: Bool, sentCallback: ARTCallback?, ackCallback: ARTStatusCallback? = nil)