UNPKG

1.05 kBTypeScriptView Raw
1import { WebSocketConnectionProvider, WebSocketOptions } from '../../browser/messaging/ws-connection-provider';
2import { FrontendApplicationContribution } from '../../browser/frontend-application-contribution';
3import { Channel } from '../../common';
4/**
5 * Customized connection provider between the frontend and the backend in electron environment.
6 * This customized connection provider makes sure the websocket connection does not try to reconnect
7 * once the electron-browser window is refreshed. Otherwise, backend resources are not disposed.
8 */
9export declare class ElectronWebSocketConnectionProvider extends WebSocketConnectionProvider implements FrontendApplicationContribution {
10 /**
11 * Do not try to reconnect when the frontend application is stopping. The browser is navigating away from this page.
12 */
13 protected stopping: boolean;
14 onStop(): void;
15 openChannel(path: string, handler: (channel: Channel) => void, options?: WebSocketOptions): Promise<void>;
16}
17//# sourceMappingURL=electron-ws-connection-provider.d.ts.map
\No newline at end of file