ARTWebSocketTransport
Objective-C
@interface ARTWebSocketTransport : NSObject <ARTRealtimeTransport>
- (instancetype)init UNAVAILABLE_ATTRIBUTE;
- (instancetype)initWithRest:(ARTRestInternal *)rest options:(ARTClientOptions *)options resumeKey:(nullable NSString *)resumeKey logger:(ARTInternalLog *)logger webSocketFactory:(id<ARTWebSocketFactory>)webSocketFactory NS_DESIGNATED_INITIALIZER;
@property (readonly, nonatomic) NSString *resumeKey;
@end
Swift
class ARTWebSocketTransport : NSObject, ARTRealtimeTransport
Undocumented
-
Unavailable
Undocumented
Declaration
Objective-C
- (instancetype)init UNAVAILABLE_ATTRIBUTE; -
Undocumented
Declaration
Objective-C
- (instancetype)initWithRest:(ARTRestInternal *)rest options:(ARTClientOptions *)options resumeKey:(nullable NSString *)resumeKey logger:(ARTInternalLog *)logger webSocketFactory:(id<ARTWebSocketFactory>)webSocketFactory NS_DESIGNATED_INITIALIZER;Swift
init(rest: ARTRestInternal, options: ARTClientOptions, resumeKey: String?, logger: InternalLog, webSocketFactory: any WebSocketFactory) -
Undocumented
Declaration
Objective-C
@property (readonly, nonatomic) NSString *resumeKeySwift
var resumeKey: String { get } -
Undocumented
Declaration
Objective-C
@property (nonatomic) id<ARTEncoder> encoderSwift
var encoder: any ARTEncoder { get set } -
Undocumented
Declaration
Objective-C
@property (readonly, nonatomic) ARTInternalLog *loggerSwift
var logger: InternalLog { get } -
Undocumented
Declaration
Objective-C
@property (readonly, nonatomic) ARTClientOptions *optionsSwift
var options: ARTClientOptions { get } -
Undocumented
Declaration
Objective-C
@property (nonatomic, nullable) id<ARTWebSocket> websocketSwift
var websocket: (any ARTWebSocket)? { get set } -
Undocumented
Declaration
Objective-C
@property (nonatomic, nullable) NSURL *websocketURLSwift
var websocketURL: URL? { get set } -
Undocumented
Declaration
Objective-C
- (NSURL *)setupWebSocket:(NSDictionary<NSString *, NSURLQueryItem *> *)params withOptions:(ARTClientOptions *)options resumeKey:(NSString *_Nullable)resumeKey;Swift
func setupWebSocket(_ params: [String : URLQueryItem], with options: ARTClientOptions, resumeKey: String?) -> URL -
Undocumented
Declaration
Objective-C
- (void)setState:(ARTRealtimeTransportState)state;Swift
func setState(_ state: ARTRealtimeTransportState) -
This is called as a result of a call to
-connectWithToken:or-connectWithKey:. It calls (asynchronously on a queue internal to this transport)-openon the underlyingARTWebSocket.Exposed so that test subclasses can override and replace or wrap in additional logic.
Declaration
Objective-C
- (void)openWebSocket;Swift
func openWebSocket()