From 1f1f41c81e7c4ee2e2e5a017cf77a800c2cb0c4a Mon Sep 17 00:00:00 2001 From: Lorenzo Blasa Date: Tue, 27 Jul 2021 09:20:39 -0700 Subject: [PATCH] Rename websocketClientFlipperConnection Summary: At the moment Flipper spawns a WebSocket server which can be used to debug Web applications in the Browser i.e. Kite. This diff renames websocketClientFlipperConnection to BrowserClientFlipperConnection. Renamed to make it clearer what type of connection it really is. WebSocket connections will no longer have the same meaning once RSocket is removed and WebSockets are used instead. Reviewed By: jknoxville Differential Revision: D29937656 fbshipit-source-id: 99d55fcfe256865add1ba3aada2c23f935f5cabe --- desktop/app/src/comms/ServerController.tsx | 4 ++-- ...ipperConnection.tsx => BrowserClientFlipperConnection.tsx} | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) rename desktop/app/src/utils/js-client-server-utils/{websocketClientFlipperConnection.tsx => BrowserClientFlipperConnection.tsx} (96%) diff --git a/desktop/app/src/comms/ServerController.tsx b/desktop/app/src/comms/ServerController.tsx index edefcf889..f6f34a28c 100644 --- a/desktop/app/src/comms/ServerController.tsx +++ b/desktop/app/src/comms/ServerController.tsx @@ -38,7 +38,7 @@ import {buildClientId} from '../utils/clientUtils'; import {Single} from 'rsocket-flowable'; import WebSocket from 'ws'; import JSDevice from '../devices/JSDevice'; -import {WebsocketClientFlipperConnection} from '../utils/js-client-server-utils/websocketClientFlipperConnection'; +import {BrowserClientFlipperConnection} from '../utils/js-client-server-utils/BrowserClientFlipperConnection'; import querystring from 'querystring'; import {IncomingMessage} from 'http'; import ws from 'ws'; @@ -217,7 +217,7 @@ class ServerController extends EventEmitter { const plugins = message.plugins; let resolvedClient: Client | null = null; const client = this.addConnection( - new WebsocketClientFlipperConnection(ws, app, plugins), + new BrowserClientFlipperConnection(ws, app, plugins), { app, os: 'JSWebApp', diff --git a/desktop/app/src/utils/js-client-server-utils/websocketClientFlipperConnection.tsx b/desktop/app/src/utils/js-client-server-utils/BrowserClientFlipperConnection.tsx similarity index 96% rename from desktop/app/src/utils/js-client-server-utils/websocketClientFlipperConnection.tsx rename to desktop/app/src/utils/js-client-server-utils/BrowserClientFlipperConnection.tsx index 985ea966a..a398bc00d 100644 --- a/desktop/app/src/utils/js-client-server-utils/websocketClientFlipperConnection.tsx +++ b/desktop/app/src/utils/js-client-server-utils/BrowserClientFlipperConnection.tsx @@ -15,7 +15,7 @@ import { ResponseType, } from '../../comms/ClientConnection'; -export class WebsocketClientFlipperConnection implements ClientConnection { +export class BrowserClientFlipperConnection implements ClientConnection { websocket: WebSocket; connStatusSubscribers: Set = new Set(); connStatus: ConnectionStatus;