ARTConnectionInternal
Objective-C
@interface ARTConnectionInternal : NSObject
@property (nullable, readonly, nonatomic) NSString *id;
@property (nullable, readonly, nonatomic) NSString *key;
@property (readonly, nonatomic) NSInteger maxMessageSize;
@property (readonly, nonatomic) ARTRealtimeConnectionState state;
@property (nullable, readonly, nonatomic) ARTErrorInfo *errorReason;
- (instancetype)initWithRealtime:(ARTRealtimeInternal *)realtime logger:(ARTInternalLog *)logger;
- (nullable NSString *)id_nosync;
- (nullable NSString *)key_nosync;
- (BOOL)isActive_nosync;
- (ARTRealtimeConnectionState)state_nosync;
- (nullable ARTErrorInfo *)errorReason_nosync;
- (nullable ARTErrorInfo *)error_nosync;
- (nullable NSString *)createRecoveryKey_nosync;
@property (readonly, nonatomic) ARTEventEmitter<ARTEvent *, ARTConnectionStateChange *> *eventEmitter;
@property(weak, nonatomic) ARTRealtimeInternal* realtime; // weak because realtime owns self
- (void)setId:(NSString *_Nullable)newId;
- (void)setKey:(NSString *_Nullable)key;
- (void)setMaxMessageSize:(NSInteger)maxMessageSize;
- (void)setState:(ARTRealtimeConnectionState)state;
- (void)setErrorReason:(ARTErrorInfo *_Nullable)errorReason;
- (void)emit:(ARTRealtimeConnectionEvent)event with:(ARTConnectionStateChange *)data;
@property (readonly, nonatomic) dispatch_queue_t queue;
@property (nullable, readonly) NSString *recoveryKey DEPRECATED_MSG_ATTRIBUTE("Use `createRecoveryKey` method instead.");
- (nullable NSString *)createRecoveryKey;
- (void)connect;
- (void)close;
- (void)ping:(ARTCallback)callback;
#pragma mark ARTEventEmitter
/**
* Embeds an `ARTEventEmitter` object.
*/
ART_EMBED_INTERFACE_EVENT_EMITTER(ARTRealtimeConnectionEvent, ARTConnectionStateChange *)
@end
Swift
class ARTConnectionInternal : NSObject
Undocumented
-
Undocumented
Declaration
Objective-C
@property (nullable, readonly, nonatomic) NSString *id
Swift
var id: String? { get }
-
Undocumented
Declaration
Objective-C
@property (nullable, readonly, nonatomic) NSString *key
Swift
var key: String? { get }
-
Undocumented
Declaration
Objective-C
@property (readonly, nonatomic) NSInteger maxMessageSize
Swift
var maxMessageSize: Int { get }
-
Undocumented
Declaration
Objective-C
@property (readonly, nonatomic) ARTRealtimeConnectionState state
Swift
var state: ARTRealtimeConnectionState { get }
-
Undocumented
Declaration
Objective-C
@property (nullable, readonly, nonatomic) ARTErrorInfo *errorReason
Swift
var errorReason: ARTErrorInfo? { get }
-
Undocumented
Declaration
Objective-C
- (instancetype)initWithRealtime:(ARTRealtimeInternal *)realtime logger:(ARTInternalLog *)logger;
Swift
init(realtime: ARTRealtimeInternal, logger: InternalLog)
-
Undocumented
Declaration
Objective-C
- (nullable NSString *)id_nosync;
Swift
func id_nosync() -> String?
-
Undocumented
Declaration
Objective-C
- (nullable NSString *)key_nosync;
Swift
func key_nosync() -> String?
-
Undocumented
Declaration
Objective-C
- (BOOL)isActive_nosync;
Swift
func isActive_nosync() -> Bool
-
Undocumented
Declaration
Objective-C
- (ARTRealtimeConnectionState)state_nosync;
Swift
func state_nosync() -> ARTRealtimeConnectionState
-
Undocumented
Declaration
Objective-C
- (nullable ARTErrorInfo *)errorReason_nosync;
Swift
func errorReason_nosync() -> ARTErrorInfo?
-
Undocumented
Declaration
Objective-C
- (nullable ARTErrorInfo *)error_nosync;
Swift
func error_nosync() -> ARTErrorInfo?
-
Undocumented
Declaration
Objective-C
- (nullable NSString *)createRecoveryKey_nosync;
Swift
func createRecoveryKey_nosync() -> String?
-
Undocumented
Declaration
Objective-C
@property (readonly, nonatomic) ARTEventEmitter<ARTEvent *, ARTConnectionStateChange *> *eventEmitter
Swift
var eventEmitter: ARTEventEmitter<ARTEvent, ARTConnectionStateChange> { get }
-
Undocumented
Declaration
Objective-C
@property(weak, nonatomic) ARTRealtimeInternal* realtime
Swift
weak var realtime: ARTRealtimeInternal? { get set }
-
Undocumented
Declaration
Objective-C
- (void)emit:(ARTRealtimeConnectionEvent)event with:(ARTConnectionStateChange *)data;
Swift
func emit(_ event: ARTRealtimeConnectionEvent, with data: ARTConnectionStateChange)
-
Undocumented
Declaration
Objective-C
@property (readonly, nonatomic) dispatch_queue_t queue
Swift
var queue: dispatch_queue_t { get }
-
Deprecated
Use
createRecoveryKey
method instead.Undocumented
Declaration
Objective-C
@property (nullable, readonly) NSString *recoveryKey
Swift
var recoveryKey: String? { get }
-
Undocumented
Declaration
Objective-C
- (nullable NSString *)createRecoveryKey;
Swift
func createRecoveryKey() -> String?
-
Undocumented
Declaration
Objective-C
- (void)connect;
Swift
func connect()
-
Undocumented
Declaration
Objective-C
- (void)close;
Swift
func close()
-
Undocumented
Declaration
Objective-C
- (void)ping:(ARTCallback)callback;
Swift
func ping(_ callback: @escaping ARTCallback)
-
Embeds an
ARTEventEmitter
object.Declaration
Objective-C
- (nonnull ARTEventListener *) on:(ARTRealtimeConnectionEvent)event callback:(nonnull void (^)(ARTConnectionStateChange *_Nonnull))cb;
Swift
func on(_ event: ARTRealtimeConnectionEvent, callback cb: @escaping (ARTConnectionStateChange) -> Void) -> ARTEventListener
-
Embeds an
ARTEventEmitter
object.Declaration
Objective-C
- (nonnull ARTEventListener *)on: (nonnull void (^)(ARTConnectionStateChange *_Nonnull))cb;
Swift
func on(_ cb: @escaping (ARTConnectionStateChange) -> Void) -> ARTEventListener
-
Embeds an
ARTEventEmitter
object.Declaration
Objective-C
- (nonnull ARTEventListener *) once:(ARTRealtimeConnectionEvent)event callback:(nonnull void (^)(ARTConnectionStateChange *_Nonnull))cb;
Swift
func once(_ event: ARTRealtimeConnectionEvent, callback cb: @escaping (ARTConnectionStateChange) -> Void) -> ARTEventListener
-
Embeds an
ARTEventEmitter
object.Declaration
Objective-C
- (nonnull ARTEventListener *)once: (nonnull void (^)(ARTConnectionStateChange *_Nonnull))cb;
Swift
func once(_ cb: @escaping (ARTConnectionStateChange) -> Void) -> ARTEventListener
-
Embeds an
ARTEventEmitter
object.Declaration
Objective-C
- (void)off:(ARTRealtimeConnectionEvent)event listener:(nonnull ARTEventListener *)listener;
Swift
func off(_ event: ARTRealtimeConnectionEvent, listener: ARTEventListener)
-
Embeds an
ARTEventEmitter
object.Declaration
Objective-C
- (void)off:(nonnull ARTEventListener *)listener;
Swift
func off(_ listener: ARTEventListener)
-
Embeds an
ARTEventEmitter
object.Declaration
Objective-C
- (void)off;
Swift
func off()