Generify everything a little
This commit is contained in:
@@ -1,14 +1,17 @@
|
||||
import {Center} from "../Center/Center";
|
||||
import {PDU} from "../CommonObjects";
|
||||
import {PduProcessor} from "./PduProcessor";
|
||||
|
||||
export class DebugPduProcessor extends PduProcessor {
|
||||
servesSessionType: string = Center.name;
|
||||
serverSessionType: string = Center.name;
|
||||
|
||||
processPdu(session: any, pdu: any, ...args: any[]): Promise<any> {
|
||||
processPdu(session: any, pdu: PDU, ...args: any[]): Promise<any> {
|
||||
return new Promise<any>((resolve, reject) => {
|
||||
session.send(pdu.response(), (replyPdu: any) => {
|
||||
resolve(replyPdu);
|
||||
});
|
||||
if (pdu.response) {
|
||||
session.send(pdu.response(), (replyPdu: any) => {
|
||||
resolve(replyPdu);
|
||||
});
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user