1
0
mirror of https://gitlab.com/comunic/comunicapiv2 synced 2025-06-20 08:35:17 +00:00

Start to implement WebSockets route system

This commit is contained in:
2020-03-31 14:42:53 +02:00
parent 92486a01ac
commit d4b624e519
3 changed files with 56 additions and 2 deletions

View File

@ -0,0 +1,37 @@
/**
* User Web Sockets requests handler implementation
*
* @author Pierre Hubert
*/
import { BaseRequestsHandler } from "./BaseRequestsHandler";
import { ActiveClient, WsMessage } from "../controllers/UserWebSocketController";
export class UserWebSocketRequestsHandler extends BaseRequestsHandler {
constructor(private wsClient: ActiveClient, private req: WsMessage) {
super();
}
protected get userID(): number {
return this.wsClient.userID;
}
protected getPostParam(name: string) {
throw new Error("Method not implemented.");
}
public hasPostParameter(name: string): boolean {
throw new Error("Method not implemented.");
}
public error(code: number, message: string): void {
throw new Error("Method not implemented.");
}
public success(message: string): void {
throw new Error("Method not implemented.");
}
public send(data: any): void {
throw new Error("Method not implemented.");
}
}