import { DyNTS_App } from '../../_services/server/app.server'; import { DyNTS_SocketServerService } from './_services/socket-server.service'; /** * This will be the MAIN service of our server project, * follow the types and type instructions while setting up your project * * In this service, there are abstract functions that you will need to implement, * where you need to set up the main params for your application. * * The extended App is containing socket server tools * * You need to add socketService definitions to setupRoutingModules * * @example * export class App extends DyNTS_AppExtended { * * ... * * // Setting up App params, and preparing project global settings * setupAppParams(): void { * this.params = new DyNTS_AppParams({ * name: 'Warbots Server', * title: warbotsTitleLog, * version: version, * dbName: 'warbots', * }); * * // dynamoNTS_GlobalSettings.logRequestsContent = false; * } * * ... * * // Setting up DBServices * setGlobalServiceCollection(): void { * DyNTS_GlobalService.setServices({ * authService: AuthService.getInstance(), * emailServiceCollection: EmailServiceCollectionService.getInstance(), * dbModels: [ * userModelParams, * userDataModelParams, * userOptionsModelParams, * userStatisticsModelParams, * userAchievementsModelParams, * userNotificationsModelParams, * * matchStatisticsModelParams, * matchDataModelParams, * DyFM_usageSession_dataParams, * DyFM_customData_dataParams, * ] * }); * } * * ... * * // Setting up Routes * setupRoutingModules(): void { * this.httpPort = env.port; * this.routingModules = [ * new DyNTS_RoutingModule({ * route: '/user', * controllers: [ * UserController.getInstance(), * UserDataController.getInstance(), * UserOptionsController.getInstance(), * UserStatisticsController.getInstance(), * UserAchievementsController.getInstance(), * UserNotificationsController.getInstance() * ] * }), * new DyNTS_RoutingModule({ * route: '/match', * controllers: [ * MatchController.getInstance(), * MatchDistributionController.getInstance(), * MatchStatisticsController.getInstance(), * ] * }), * new DyNTS_RoutingModule({ * route: '/server', * controllers: [ * ServerController.getInstance(), * ] * }), * getTestRoutingModule(), * getUsageRoutingModule() * ]; * * ... * * // Setting up Sockets (port opcionális – ha nincs megadva, a HTTP/HTTPS portot használjuk, same port) * this.socketServices = [ * NotificationService.getInstance(), * ChatService.getInstance(), * ... * ]; * } * } */ export declare abstract class DyNTS_AppExtended extends DyNTS_App { private readonly systemControlsExt; get started(): boolean; private httpsSocketSettingUpCount; private httpSocketSettingUpCount; private socketSecurity; /** Csak akkor van értékadva, ha nincs base httpServer (pl. nincs open route) és open socket van. */ private httpSocketServer; /** * Socket szolgáltatások. A port opcionális: ha nincs megadva, az extended app * a getPortSettings() httpPort/httpsPort értékét használja (WebSocket és HTTP ugyanazon a porton). * @example * // Setting up Sockets * this.socketServices = [ * NotificationService.getInstance(), * ChatService.getInstance(), * ... * ]; */ protected socketServices: DyNTS_SocketServerService[]; private readonly allSocketServers; constructor(); protected asyncConstruct(extended?: boolean): Promise; ready(timeout?: number): Promise; stop(): Promise; /** * */ private setSocketSecurity; /** * Socket szerverek felállítása. By default a socket a HTTP/HTTPS porton fut (same port); * ha a service.port nincs megadva, a getPortSettings() httpPort/httpsPort értékét használjuk. * Ha a base app már listenel (httpServer/httpsServer), arra attacholjuk a Socket.IO-t, * különben külön httpSocketServer-t hozunk létre és listenelünk. * A Socket.IO path a portSettings.socketPath-ből jön (default: DyNTS_defaultSocketPath); a kliensnek ugyanazt kell használnia. */ private setupSocketServerServices; /** * MISSING Description (TODO) */ abstract getSocketServices(): DyNTS_SocketServerService[]; private __getDefaultErrorSettings; } //# sourceMappingURL=app-extended.server.d.ts.map