some more logic

request/response abstraction to make transparent function calls happen
This commit is contained in:
2016-08-09 16:33:56 +02:00
parent f670cae1f8
commit 5109964247
5 changed files with 61 additions and 12 deletions

View File

@@ -78,10 +78,17 @@ export class SocketConnection {
return socketFunctionArg.name === dataArg.functionName
});
if(referencedFunction !== undefined){
referencedFunction.invoke(dataArg);
let localSocketRequest = new SocketRequest({
side:"responding",
shortid:dataArg.shortId,
requestData:dataArg
});
} else {
plugins.beautylog.warn("function not existent or out of access scope");
};
});
this.socket.on("functionResponse", (dataArg:ISocketFunctionRequestObject) => {
})
} else {
done.reject("socket needs to be authenticated first");