From ac489858f8af0087187675a6501cf281582f5630 Mon Sep 17 00:00:00 2001 From: Adam Ernst Date: Thu, 8 Dec 2016 07:28:08 -0800 Subject: [PATCH] Clean up RCTWebSocketProxyDelegate a bit Reviewed By: javache Differential Revision: D4296294 fbshipit-source-id: b31e522c21ec490fdf98711655e5e8df22b32a12 --- Libraries/WebSocket/RCTWebSocketManager.m | 2 +- React/Base/RCTWebSocketProxyDelegate.h | 2 +- React/Modules/RCTDevMenu.m | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Libraries/WebSocket/RCTWebSocketManager.m b/Libraries/WebSocket/RCTWebSocketManager.m index 2f6011988..d6a2c5b43 100644 --- a/Libraries/WebSocket/RCTWebSocketManager.m +++ b/Libraries/WebSocket/RCTWebSocketManager.m @@ -66,7 +66,7 @@ NSDictionary *msg = RCTJSONParse(message, &error); if (!error) { - [_delegate socketProxy:[RCTWebSocketManager sharedInstance] didReceiveMessage:msg]; + [_delegate didReceiveWebSocketMessage:msg]; } else { RCTLogError(@"WebSocketManager failed to parse message with error %@\n\n%@\n", error, message); } diff --git a/React/Base/RCTWebSocketProxyDelegate.h b/React/Base/RCTWebSocketProxyDelegate.h index 5e4a49451..fe58a09b3 100644 --- a/React/Base/RCTWebSocketProxyDelegate.h +++ b/React/Base/RCTWebSocketProxyDelegate.h @@ -14,7 +14,7 @@ @protocol RCTWebSocketProxy; @protocol RCTWebSocketProxyDelegate -- (void)socketProxy:(id)sender didReceiveMessage:(NSDictionary *)message; +- (void)didReceiveWebSocketMessage:(NSDictionary *)message; @end #endif diff --git a/React/Modules/RCTDevMenu.m b/React/Modules/RCTDevMenu.m index 43d59f340..92640da79 100644 --- a/React/Modules/RCTDevMenu.m +++ b/React/Modules/RCTDevMenu.m @@ -281,7 +281,7 @@ RCT_EXPORT_MODULE() return [kSupportedVersions containsObject:version]; } -- (void)socketProxy:(__unused id)sender didReceiveMessage:(NSDictionary *)message +- (void)didReceiveWebSocketMessage:(NSDictionary *)message { if ([self isSupportedVersion:message[@"version"]]) { [self processTarget:message[@"target"] action:message[@"action"] options:message[@"options"]];