2022-08-17 02:29:54 -04:00
|
|
|
/// <reference types="node" />
|
2022-12-25 18:45:30 -05:00
|
|
|
import http, { IncomingMessage, ServerResponse } from "http";
|
2022-08-17 02:29:54 -04:00
|
|
|
import { ApplicationContext } from "../context/ApplicationContext";
|
|
|
|
import { HttpServerHelper } from "../helpers/HttpServerHelper";
|
|
|
|
import { IHttpConfig } from "../models/spt/config/IHttpConfig";
|
|
|
|
import { ILogger } from "../models/spt/utils/ILogger";
|
2022-12-25 18:45:30 -05:00
|
|
|
import { LocalisationService } from "../services/LocalisationService";
|
2022-08-17 02:29:54 -04:00
|
|
|
import { ConfigServer } from "./ConfigServer";
|
|
|
|
import { DatabaseServer } from "./DatabaseServer";
|
2022-12-25 18:45:30 -05:00
|
|
|
import { IHttpListener } from "./http/IHttpListener";
|
|
|
|
import { WebSocketServer } from "./WebSocketServer";
|
|
|
|
export declare class HttpServer {
|
2022-08-17 02:29:54 -04:00
|
|
|
protected logger: ILogger;
|
|
|
|
protected databaseServer: DatabaseServer;
|
|
|
|
protected httpServerHelper: HttpServerHelper;
|
2022-12-25 18:45:30 -05:00
|
|
|
protected localisationService: LocalisationService;
|
|
|
|
protected httpListeners: IHttpListener[];
|
2022-08-17 02:29:54 -04:00
|
|
|
protected configServer: ConfigServer;
|
|
|
|
protected applicationContext: ApplicationContext;
|
2022-12-25 18:45:30 -05:00
|
|
|
protected webSocketServer: WebSocketServer;
|
|
|
|
constructor(logger: ILogger, databaseServer: DatabaseServer, httpServerHelper: HttpServerHelper, localisationService: LocalisationService, httpListeners: IHttpListener[], configServer: ConfigServer, applicationContext: ApplicationContext, webSocketServer: WebSocketServer);
|
2022-08-17 02:29:54 -04:00
|
|
|
protected httpConfig: IHttpConfig;
|
|
|
|
getCookies(req: http.IncomingMessage): any;
|
2022-12-25 18:45:30 -05:00
|
|
|
handleRequest(req: IncomingMessage, resp: ServerResponse): void;
|
2022-08-17 02:29:54 -04:00
|
|
|
load(): void;
|
|
|
|
}
|