ClearVision/types/servers/HttpServer.d.ts

30 lines
1.5 KiB
TypeScript
Raw Normal View History

2022-07-09 16:03:26 -04:00
/// <reference types="node" />
2022-10-06 23:29:01 -04:00
import http, { IncomingMessage, ServerResponse } from "http";
import { ApplicationContext } from "../context/ApplicationContext";
2022-07-09 16:03:26 -04:00
import { HttpServerHelper } from "../helpers/HttpServerHelper";
import { IHttpConfig } from "../models/spt/config/IHttpConfig";
import { ILogger } from "../models/spt/utils/ILogger";
2022-11-20 14:59:15 -05:00
import { LocalisationService } from "../services/LocalisationService";
2022-07-09 16:03:26 -04:00
import { ConfigServer } from "./ConfigServer";
import { DatabaseServer } from "./DatabaseServer";
2022-10-06 23:29:01 -04:00
import { IHttpListener } from "./http/IHttpListener";
2022-11-20 14:59:15 -05:00
import { WebSocketServer } from "./WebSocketServer";
2022-10-06 23:29:01 -04:00
export declare class HttpServer {
2022-07-09 16:03:26 -04:00
protected logger: ILogger;
protected databaseServer: DatabaseServer;
protected httpServerHelper: HttpServerHelper;
2022-11-20 14:59:15 -05:00
protected localisationService: LocalisationService;
2022-10-06 23:29:01 -04:00
protected httpListeners: IHttpListener[];
2022-07-09 16:03:26 -04:00
protected configServer: ConfigServer;
2022-10-06 23:29:01 -04:00
protected applicationContext: ApplicationContext;
2022-11-20 14:59:15 -05:00
protected webSocketServer: WebSocketServer;
2022-07-09 16:03:26 -04:00
protected httpConfig: IHttpConfig;
2023-05-18 15:57:25 -04:00
constructor(logger: ILogger, databaseServer: DatabaseServer, httpServerHelper: HttpServerHelper, localisationService: LocalisationService, httpListeners: IHttpListener[], configServer: ConfigServer, applicationContext: ApplicationContext, webSocketServer: WebSocketServer);
/**
* Handle server loading event
*/
2022-07-09 16:03:26 -04:00
load(): void;
2023-05-18 15:57:25 -04:00
protected handleRequest(req: IncomingMessage, resp: ServerResponse): void;
protected getCookies(req: http.IncomingMessage): Record<string, string>;
2022-07-09 16:03:26 -04:00
}