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
-
Undocumented
Declaration
Objective-C
- (instancetype)initWithURL:(NSURL *)url;
Swift
init(url: URL)
-
Undocumented
Declaration
Objective-C
- (instancetype)initWithURL:(NSURL *)url protocols:(NSArray<NSString *> *)protocols;
Swift
init(url: URL, protocols: [String])
-
Undocumented
Declaration
Objective-C
- (instancetype)initWithRequest:(NSURLRequest *)request;
Swift
init(request: URLRequest)
-
Undocumented
Declaration
Objective-C
@property (nonatomic, nullable, weak) id<LCRTMWebSocketDelegate> delegate
Swift
weak var delegate: LCRTMWebSocketDelegate? { get set }
-
Undocumented
Declaration
Objective-C
@property (nonatomic) dispatch_queue_t delegateQueue
Swift
var delegateQueue: DispatchQueue { get set }
-
Undocumented
Declaration
Objective-C
@property (nonatomic) NSMutableURLRequest *request
Swift
var request: NSMutableURLRequest { get set }
-
Undocumented
Declaration
Objective-C
@property (nonatomic, nullable) id sslSettings
Swift
var sslSettings: Any? { get set }
-
Unavailable
Undocumented
Declaration
Objective-C
- (instancetype)init NS_UNAVAILABLE;
-
Unavailable
Undocumented
Declaration
Objective-C
+ (instancetype)new NS_UNAVAILABLE;
-
Undocumented
Declaration
Objective-C
- (void)open;
Swift
func open()
-
Undocumented
Declaration
Objective-C
- (void)closeWithCloseCode:(LCRTMWebSocketCloseCode)closeCode reason:(NSData * _Nullable)reason;
Swift
func close(with closeCode: LCRTMWebSocketCloseCode, reason: Data?)
-
Undocumented
Declaration
Objective-C
- (void)sendMessage:(LCRTMWebSocketMessage *)message completion:(void (^ _Nullable)(void))completion;
Swift
func send(_ message: LCRTMWebSocketMessage) async
-
Undocumented
Declaration
Objective-C
- (void)sendPing:(NSData * _Nullable)data completion:(void (^ _Nullable)(void))completion;
Swift
func sendPing(_ data: Data?) async
-
Undocumented
Declaration
Objective-C
- (void)sendPong:(NSData * _Nullable)data completion:(void (^ _Nullable)(void))completion;
Swift
func sendPong(_ data: Data?) async
-
Undocumented
Declaration
Objective-C
- (void)clean;
Swift
func clean()