WebSocketListener: add app field getter

This commit is contained in:
Alice Gaudon 2020-07-19 12:21:56 +02:00
parent 197b963e4c
commit 4291f73a55
2 changed files with 5 additions and 1 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "wms-core", "name": "wms-core",
"version": "0.17.0", "version": "0.17.1",
"description": "Node web framework", "description": "Node web framework",
"repository": "git@gitlab.com:ArisuOngaku/wms-core.git", "repository": "git@gitlab.com:ArisuOngaku/wms-core.git",
"author": "Alice Gaudon <alice@gaudon.pro>", "author": "Alice Gaudon <alice@gaudon.pro>",

View File

@ -9,6 +9,10 @@ export default abstract class WebSocketListener<T extends Application> {
this.app = app; this.app = app;
} }
protected getApp(): T {
return this.app;
}
public abstract path(): string; public abstract path(): string;
public abstract async handle(socket: WebSocket, request: IncomingMessage, session: Express.SessionData): Promise<void>; public abstract async handle(socket: WebSocket, request: IncomingMessage, session: Express.SessionData): Promise<void>;