Minor cleanup

This commit is contained in:
David Majdandžić
2023-03-31 17:13:39 +02:00
parent 17a1c10c05
commit fb310fa53a
3 changed files with 4 additions and 7 deletions

View File

@@ -11,10 +11,6 @@ export default class PersistentPromise {
});
}
getPromise(): Promise<any> {
return this.promise;
}
resolve(value?: any): void {
if (this.promiseResolve) {
this.promiseResolve(value);

View File

@@ -22,7 +22,7 @@ export abstract class SmppSession {
readonly counterUpdateTimer: any = new NanoTimer();
readonly MESSAGE_SEND_UPDATE_DELAY: number = Number(process.env.MESSAGE_SEND_UPDATE_DELAY) || 500;
constructor() {
protected constructor() {
this.eventEmitter.on(this.EVENT.STATE_CHANGED, () => this.updateWs(this.EVENT.STATE_CHANGED));
this.eventEmitter.on(this.EVENT.STATUS_CHANGED, () => this.updateWs(this.EVENT.STATUS_CHANGED));
this.eventEmitter.on(this.EVENT.ANY_PDU, (pdu: any) => this.updateWs(this.EVENT.ANY_PDU, [pdu]));

View File

@@ -8,7 +8,6 @@ import {PduProcessor} from "./PDUProcessor/PduProcessor";
import {WSServer} from "./WS/WSServer";
const {PDU} = require("smpp");
// TODO: Add support for encodings
let logger = new Logger("main");
@@ -17,7 +16,9 @@ PduProcessor.addProcessor(EchoPduProcessor);
let clientManager: ClientSessionManager = new ClientSessionManager();
let centerManager: CenterSessionManager = new CenterSessionManager();
// TODO: Add support for encodings
// TODO: Fix reading and writing processors
// TODO: Try creating multiple entries with the same arg
let wss: WSServer = new WSServer([clientManager, centerManager]);
let httpServer: HttpServer = new HttpServer(clientManager, centerManager);