Files
smsgw-tester/src/PDUProcessor/DebugPduProcessor.ts
2023-03-30 17:50:49 +02:00

17 lines
462 B
TypeScript

import {Center} from "../Center/Center";
import {PDU} from "../CommonObjects";
import {PduProcessor} from "./PduProcessor";
export class DebugPduProcessor extends PduProcessor {
serverSessionType: string = Center.name;
processPdu(session: any, pdu: PDU, ...args: any[]): Promise<any> {
return new Promise<any>((resolve, reject) => {
if (pdu.response) {
session.send(pdu.response(), (replyPdu: any) => {
resolve(replyPdu);
});
}
})
}
}