mirror of
https://github.com/status-im/react-native.git
synced 2025-01-14 03:26:07 +00:00
Expose didCloseWithCode in RCTReconnectingWebSocket
Summary: Expose didCloseWithCode in RCTReconnectingWebSocket in order to get notified when the reconnecting websocket is closed by the end-point. Reviewed By: javache Differential Revision: D5573394 fbshipit-source-id: 78bffeb98c6bf32b059194fc07ffc1f0a7bf4aae
This commit is contained in:
parent
220034c4d4
commit
72dae519d0
@ -17,6 +17,8 @@
|
||||
|
||||
- (void)webSocket:(RCTSRWebSocket *)webSocket didReceiveMessage:(id)message;
|
||||
|
||||
- (void)webSocket:(RCTSRWebSocket *)webSocket didCloseWithCode:(NSInteger)code reason:(NSString *)reason wasClean:(BOOL)wasClean;
|
||||
|
||||
@end
|
||||
|
||||
@interface RCTReconnectingWebSocket : NSObject
|
||||
|
@ -80,6 +80,7 @@
|
||||
|
||||
- (void)webSocket:(RCTSRWebSocket *)webSocket didCloseWithCode:(NSInteger)code reason:(NSString *)reason wasClean:(BOOL)wasClean
|
||||
{
|
||||
[self.delegate webSocket:webSocket didCloseWithCode:code reason:reason wasClean:wasClean];
|
||||
[self reconnect];
|
||||
}
|
||||
|
||||
|
@ -61,6 +61,10 @@
|
||||
}
|
||||
}
|
||||
|
||||
- (void)webSocket:(RCTSRWebSocket *)webSocket didCloseWithCode:(NSInteger)code reason:(NSString *)reason wasClean:(BOOL)wasClean
|
||||
{
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
#endif
|
||||
|
@ -133,6 +133,10 @@ static BOOL isSupportedVersion(NSNumber *version)
|
||||
}
|
||||
}
|
||||
|
||||
- (void)webSocket:(RCTSRWebSocket *)webSocket didCloseWithCode:(NSInteger)code reason:(NSString *)reason wasClean:(BOOL)wasClean
|
||||
{
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user