2016-02-17 07:04:18 +00:00
|
|
|
/**
|
|
|
|
* Copyright (c) 2015-present, Facebook, Inc.
|
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
* This source code is licensed under the BSD-style license found in the
|
|
|
|
* LICENSE file in the root directory of this source tree. An additional grant
|
|
|
|
* of patent rights can be found in the PATENTS file in the same directory.
|
|
|
|
*/
|
|
|
|
|
2016-11-23 15:47:52 +00:00
|
|
|
#import <React/RCTDefines.h>
|
2016-02-17 07:04:18 +00:00
|
|
|
|
|
|
|
#if RCT_DEV // Only supported in dev mode
|
|
|
|
|
2017-07-26 15:12:12 +00:00
|
|
|
@protocol RCTWebSocketObserverDelegate
|
|
|
|
|
|
|
|
- (void)didReceiveWebSocketMessage:(NSDictionary<NSString *, id> *)message;
|
|
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
@interface RCTWebSocketObserver : NSObject
|
|
|
|
|
|
|
|
- (instancetype)initWithURL:(NSURL *)url;
|
2017-08-14 15:07:13 +00:00
|
|
|
- (void)setDelegateDispatchQueue:(dispatch_queue_t)queue;
|
2017-07-26 15:12:12 +00:00
|
|
|
|
|
|
|
@property (nonatomic, weak) id<RCTWebSocketObserverDelegate> delegate;
|
|
|
|
|
|
|
|
- (void)start;
|
|
|
|
- (void)stop;
|
|
|
|
|
2016-12-08 15:28:12 +00:00
|
|
|
@end
|
|
|
|
|
2016-02-17 07:04:18 +00:00
|
|
|
#endif
|