ARTRealtimeTransport

Objective-C

@protocol ARTRealtimeTransport

// All methods must be called from rest's serial queue.

@property (readonly, nonatomic) NSString *resumeKey;
@property (readonly, nonatomic) ARTRealtimeTransportState state;
@property (nullable, readwrite, nonatomic) id<ARTRealtimeTransportDelegate> delegate;
@property (nonatomic, readonly) ARTEventEmitter<ARTEvent *, id> *stateEmitter;

- (BOOL)send:(NSData *)data withSource:(nullable id)decodedObject;
- (void)receive:(ARTProtocolMessage *)msg;
- (nullable ARTProtocolMessage *)receiveWithData:(NSData *)data;
- (void)connectWithKey:(NSString *)key;
- (void)connectWithToken:(NSString *)token;
- (void)sendClose;
- (void)sendPing;
- (void)close;
- (void)abort:(ARTStatus *)reason;
- (NSString *)host;
- (void)setHost:(NSString *)host;
- (ARTRealtimeTransportState)state;

@end

Swift

protocol ARTRealtimeTransport

Undocumented

  • Undocumented

    Declaration

    Objective-C

    @property (readonly, nonatomic) NSString *resumeKey

    Swift

    var resumeKey: String { get }
  • Undocumented

    Declaration

    Objective-C

    @property (readonly, nonatomic) ARTRealtimeTransportState state

    Swift

    var state: ARTRealtimeTransportState { get }
  • Undocumented

    Declaration

    Objective-C

    @property (nullable, nonatomic) id<ARTRealtimeTransportDelegate> delegate

    Swift

    var delegate: (any ARTRealtimeTransportDelegate)? { get set }
  • Undocumented

    Declaration

    Objective-C

    @property (nonatomic, readonly) ARTEventEmitter<ARTEvent *, id> *stateEmitter

    Swift

    var stateEmitter: ARTEventEmitter<ARTEvent, AnyObject> { get }
  • Undocumented

    Declaration

    Objective-C

    - (BOOL)send:(NSData *)data withSource:(nullable id)decodedObject;

    Swift

    func send(_ data: Data, withSource decodedObject: Any?) -> Bool
  • Undocumented

    Declaration

    Objective-C

    - (void)receive:(ARTProtocolMessage *)msg;

    Swift

    func receive(_ msg: ARTProtocolMessage)
  • Undocumented

    Declaration

    Objective-C

    - (nullable ARTProtocolMessage *)receiveWithData:(NSData *)data;

    Swift

    func receive(with data: Data) -> ARTProtocolMessage?
  • Undocumented

    Declaration

    Objective-C

    - (void)connectWithKey:(NSString *)key;

    Swift

    func connect(withKey key: String)
  • Undocumented

    Declaration

    Objective-C

    - (void)connectWithToken:(NSString *)token;

    Swift

    func connect(withToken token: String)
  • Undocumented

    Declaration

    Objective-C

    - (void)sendClose;

    Swift

    func sendClose()
  • Undocumented

    Declaration

    Objective-C

    - (void)sendPing;

    Swift

    func sendPing()
  • Undocumented

    Declaration

    Objective-C

    - (void)close;

    Swift

    func close()
  • Undocumented

    Declaration

    Objective-C

    - (void)abort:(ARTStatus *)reason;

    Swift

    func abort(_ reason: ARTStatus)
  • Undocumented

    Declaration

    Objective-C

    - (NSString *)host;

    Swift

    func host() -> String
  • Undocumented

    Declaration

    Objective-C

    - (void)setHost:(NSString *)host;

    Swift

    func setHost(_ host: String)