import { ServerPackets , SERVER_PACKETS } from '@airbattle/protocol' ; import { CONNECTIONS_SEND_PACKETS , RESPONSE_BACKUP } from '../../events' ; import { BackupConnectionId } from '../../types' ; import { System } from '../system' ; export default class BackupResponse extends System { constructor ( { app } ) { super ( { app } ) ; this . listeners = { [ RESPONSE_BACKUP ] : this . onBackupResponse , } ; } param connectionId onBackupResponse ( connectionId ) { this . emit ( CONNECTIONS_SEND_PACKETS , { c : SERVER_PACKETS . BACKUP , } as ServerPackets . Backup , connectionId ) ; } }