| 20 | } |
| 21 | |
| 22 | export interface Upstream { |
| 23 | start(): void; |
| 24 | stop(): void; |
| 25 | isConnected(): boolean; |
| 26 | getConfig(): Config; |
| 27 | getAircraft(): Aircraft[]; |
| 28 | find(hex: string): Aircraft | undefined; |
| 29 | /** Patch the shared config on the server (persisted there). */ |
| 30 | patchConfig(patch: Partial<Config>): void; |
| 31 | } |
| 32 | |
| 33 | export class WsUpstream implements Upstream { |
| 34 | private ws: WebSocket | null = null; |
no outgoing calls
no test coverage detected