ScavXpCounts/types/servers/WebSocketServer.d.ts

23 lines
1.2 KiB
TypeScript
Raw Normal View History

2024-02-23 15:06:00 -07:00
import http, { IncomingMessage } from "node:http";
2024-11-12 11:51:30 -07:00
import { HttpServerHelper } from "@spt/helpers/HttpServerHelper";
import { ILogger } from "@spt/models/spt/utils/ILogger";
import { IWebSocketConnectionHandler } from "@spt/servers/ws/IWebSocketConnectionHandler";
import { LocalisationService } from "@spt/services/LocalisationService";
import { JsonUtil } from "@spt/utils/JsonUtil";
import { RandomUtil } from "@spt/utils/RandomUtil";
import { Server, WebSocket } from "ws";
2023-08-17 19:49:16 -06:00
export declare class WebSocketServer {
protected logger: ILogger;
protected randomUtil: RandomUtil;
2024-02-23 15:06:00 -07:00
protected jsonUtil: JsonUtil;
2024-11-12 11:51:30 -07:00
protected localisationService: LocalisationService;
2023-08-17 19:49:16 -06:00
protected httpServerHelper: HttpServerHelper;
2024-11-12 11:51:30 -07:00
protected webSocketConnectionHandlers: IWebSocketConnectionHandler[];
protected webSocketServer: Server;
constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, localisationService: LocalisationService, httpServerHelper: HttpServerHelper, webSocketConnectionHandlers: IWebSocketConnectionHandler[]);
getWebSocketServer(): Server;
2023-08-17 19:49:16 -06:00
setupWebSocket(httpServer: http.Server): void;
protected getRandomisedMessage(): string;
2024-11-12 11:51:30 -07:00
protected wsOnConnection(ws: WebSocket, req: IncomingMessage): void;
2023-08-17 19:49:16 -06:00
}