LCRTMWebSocket

Objective-C

@interface LCRTMWebSocket : NSObject

- (instancetype)initWithURL:(NSURL *)url;
- (instancetype)initWithURL:(NSURL *)url protocols:(NSArray<NSString *> *)protocols;
- (instancetype)initWithRequest:(NSURLRequest *)request;

@property (nonatomic, nullable, weak) id<LCRTMWebSocketDelegate> delegate;
@property (nonatomic) dispatch_queue_t delegateQueue;
@property (nonatomic) NSMutableURLRequest *request;
@property (nonatomic, nullable) id sslSettings;

- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)new NS_UNAVAILABLE;

- (void)open;
- (void)closeWithCloseCode:(LCRTMWebSocketCloseCode)closeCode reason:(NSData * _Nullable)reason;

- (void)sendMessage:(LCRTMWebSocketMessage *)message completion:(void (^ _Nullable)(void))completion;
- (void)sendPing:(NSData * _Nullable)data completion:(void (^ _Nullable)(void))completion;
- (void)sendPong:(NSData * _Nullable)data completion:(void (^ _Nullable)(void))completion;

- (void)clean;

@end

Swift

class LCRTMWebSocket : NSObject

Undocumented