Summary: moved `app/src/server` to `flipper-server-core/src` and fixed any fallout from that (aka integration points I missed on the preparing diffs). Reviewed By: passy Differential Revision: D31541378 fbshipit-source-id: 8a7e0169ebefa515781f6e5e0f7b926415d4b7e9
28 lines
700 B
TypeScript
28 lines
700 B
TypeScript
/**
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*
|
|
* @format
|
|
*/
|
|
|
|
import {ClientResponseType} from 'flipper-common';
|
|
|
|
export enum ConnectionStatus {
|
|
ERROR = 'error',
|
|
CLOSED = 'closed',
|
|
CONNECTED = 'connected',
|
|
NOT_CONNECTED = 'not_connected',
|
|
CONNECTING = 'connecting',
|
|
}
|
|
|
|
export type ConnectionStatusChange = (status: ConnectionStatus) => void;
|
|
|
|
export interface ClientConnection {
|
|
subscribeToEvents(subscriber: ConnectionStatusChange): void;
|
|
close(): void;
|
|
send(data: any): void;
|
|
sendExpectResponse(data: any): Promise<ClientResponseType>;
|
|
}
|