client for test

This commit is contained in:
andrei-mihnea-cerbu
2025-02-04 20:08:56 +02:00
parent dcf505c89b
commit 885627213e
20 changed files with 158 additions and 240 deletions
+3 -4
View File
@@ -4,20 +4,19 @@ import { FileEncryptor } from './file_encryptor'
import { TcpCommunicator } from './tcp_communicator'
import { operationCodes } from '../network/operation_codes'
import { ParsedMessage } from '../network/message_handler'
import { JsonDatabase } from '../database/database'
import { DatabaseScheme } from '../database/schemes/database_scheme'
import { Database } from '../database/database'
import { NetworkUserScheme } from '../database/schemes/network_scheme'
export class BackupManager {
private fileEncryptor: FileEncryptor | null = null
private readonly db: JsonDatabase<DatabaseScheme, any>
private readonly db: Database
private readonly clientPort: number
private isBusy: boolean = false
private intervalId: NodeJS.Timeout | null = null
private stopRequested: boolean = false
constructor(pathToDatabaseFile: string, clientPort: number) {
this.db = new JsonDatabase(pathToDatabaseFile)
this.db = new Database(pathToDatabaseFile)
this.clientPort = clientPort
}