import WebSocket from "ws"; import {IncomingMessage} from "http"; import Application from "./Application"; import {Session} from "express-session"; export default abstract class WebSocketListener { private app!: T; public init(app: T): void { this.app = app; } protected getApp(): T { return this.app; } public abstract path(): string; public abstract handle( socket: WebSocket, request: IncomingMessage, session: Session | null, ): Promise; }